Complete the sentence to define RBAC.
RBAC stands for [1].
RBAC means Role-based access control, a method to manage user permissions based on roles.
Complete the sentence to explain the main purpose of RBAC.
RBAC helps to [1] user permissions efficiently.RBAC helps to manage user permissions efficiently by assigning roles instead of individual permissions.
Fix the error in the sentence describing RBAC's assignment method.
In RBAC, permissions are assigned to [1] instead of individual users.In RBAC, permissions are assigned to roles, which are then assigned to users.
Fill both blanks to complete the RBAC example code snippet.
if user.has_role([1]) and user.permission == [2]: allow_access()
The code checks if the user has the "admin" role and the "read" permission to allow access.
Fill all three blanks to complete the RBAC dictionary comprehension example.
access_rights = {user: [1] for user, role in user_roles.items() if role == [2] and [3] in permissions[user]}This code creates a dictionary of users with full access if their role is "editor" and they have "edit" permission.