0
0
No-Codeknowledge~10 mins

User roles and permissions in No-Code - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - User roles and permissions
Start
Define Roles
Assign Permissions to Roles
Assign Roles to Users
User Tries Action
Check User's Role Permissions
Yes No
Allow
Action
This flow shows how roles are defined with permissions, assigned to users, and then checked when a user tries to perform an action.
Execution Sample
No-Code
Roles = {"Admin": ["edit", "delete"], "Viewer": ["view"]}
Users = {"Alice": "Admin", "Bob": "Viewer"}
UserAction = "delete"
User = "Bob"
# Check if Bob's role allows 'delete'
This example checks if user Bob, who is a Viewer, can perform the 'delete' action.
Analysis Table
StepUserUser RoleAction TriedPermission CheckResult
1BobViewerdeleteIs 'delete' in Viewer permissions? NoDeny action
2AliceAdmindeleteIs 'delete' in Admin permissions? YesAllow action
3BobViewerviewIs 'view' in Viewer permissions? YesAllow action
4AliceAdmineditIs 'edit' in Admin permissions? YesAllow action
5BobViewereditIs 'edit' in Viewer permissions? NoDeny action
6End---No more actions to check
💡 All user actions checked against their role permissions; process ends.
State Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4After Step 5Final
User-BobAliceBobAliceBob-
User Role-ViewerAdminViewerAdminViewer-
Action Tried-deletedeletevieweditedit-
Permission Check-NoYesYesYesNo-
Result-DenyAllowAllowAllowDeny-
Key Insights - 3 Insights
Why can't Bob perform the 'delete' action even though he is a user?
Because Bob's role is 'Viewer', which does not include the 'delete' permission as shown in execution_table step 1.
How does the system decide if an action is allowed or denied?
It checks if the action is listed in the permissions of the user's assigned role, as seen in the Permission Check column of the execution_table.
Can a user have multiple roles at the same time in this example?
No, each user has only one role assigned, simplifying permission checks as shown in the variable_tracker.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the result when Bob tries the 'view' action at step 3?
ADeny action
BNo action
CAllow action
DError
💡 Hint
Check the 'Result' column at step 3 in the execution_table.
At which step does the permission check confirm that 'edit' is allowed for Alice?
AStep 4
BStep 5
CStep 2
DStep 1
💡 Hint
Look at the 'User' and 'Action Tried' columns to find when Alice tries 'edit'.
If Bob was assigned the 'Admin' role, what would be the result when he tries 'delete' at step 1?
ADeny action
BAllow action
CNo action
DError
💡 Hint
Refer to the permissions of 'Admin' role in the execution_sample and execution_table.
Concept Snapshot
User roles group permissions.
Permissions define allowed actions.
Users get assigned roles.
When a user acts, system checks role permissions.
If allowed, action proceeds; else denied.
Full Transcript
User roles and permissions work by grouping allowed actions into roles. Each user is assigned a role. When a user tries to do something, the system checks if that action is allowed by the user's role. If yes, the action is allowed; if not, it is denied. For example, a Viewer role may only have permission to view, while an Admin role can edit or delete. This system helps control who can do what in an application.