Complete the code to assign a Viewer role to a user in Tableau.
user.setRole('[1]')
In Tableau, the Viewer role allows users to view content but not edit it.
Complete the code to check if a user has the Admin role.
if user.role == '[1]':
The Admin role has full permissions including managing users and content.
Fix the error in the code to assign multiple roles to a user.
user.setRole('[1]')
Tableau users can have only one primary role, so assigning a list with multiple roles is incorrect. Use a single valid role string.
Fill both blanks to check if a user has permission to publish content.
if user.role == '[1]' or user.role == '[2]': can_publish = True
Both Admin and Publisher roles have permission to publish content in Tableau.
Fill all three blanks to assign a role and check if the user can edit content.
user.setRole('[1]') if user.role == '[2]' or user.role == '[3]': can_edit = True
Editor and Admin roles allow editing content in Tableau. Viewer cannot edit.