Working with roles
Using roles in scripts to provide different UX
Roles Recipe Application Bundle
The root view of the recipe consists of:
- a card that is bound to the list of roles, displaying a comma-separated list of the user's roles.
- a card that is only shown if the user has the Agent role.
- a card that is only shown if the user has the Expert role.
- a card that opens either
expertViewif the user has one of those roles, or shows a notification that the user has neither of those roles.
Two new roles have been added using the permissions section of the application's dashboard (both of which will be assigned to the user that imports the application bundle). These roles are called
Expert. These roles have the same sets of permissions as the default
Userrole and only differ in name.
skylight.user.rolesrefers to Application Roles, which are the roles that can be created, modified, and deleted on the application dashboard page. In most cases, we'll want to use this list of roles.
skylight.user.rolerefers to the user's Skylight Role, which is the role of the user within the Skylight domain and is one of
This recipe uses