Using RBAC to manage access to dashboards
1 Task
30 mins
Scenario
You are a Solution Builder working on TGB's HRApps application. TGB wants to restrict Dashboard access exclusively to managers. To accomplish this, you will create a Privilege, apply it to the appropriate Access Role, create a When Rule to evaluate the Privilege, and configure the Web portal navigation to enforce the access restriction.
The following table provides the credentials you need to complete the challenge:
| Role | User name | Password |
|---|---|---|
| Solution Builder | SSA@TGB | pega123! |
After completing this challenge, you should be able to:
- Create a Privilege rule to control access to application features.
- Apply a Privilege to an Access Role.
- Create a When Rule to evaluate a Privilege expression.
- Configure portal navigation visibility using a When condition.
Detailed Tasks
1 Using RBAC to Manage Access to Dashboards
Use the technical documentation linked in the Journey map above to complete the assigned tasks. The technical documentation might have more information than you need to complete the tasks.
Acceptance criteria
Task 1: Create a Privilege for manager access
- A Privilege rule is created with the following configuration:
Field Value Label CanViewLPDashboard Apply to Data-Portal (highest available unlocked Ruleset version)
Task 2: Apply the Privilege to the HRApps:Manager Access Role
- The
HRApps:ManagerAccess Role is updated with the following privileges on the Data-Portal Class:Name Level CanViewLPDashboard5 pyDashboardsManager5
Task 3: Create the CanViewLPDashboard When Rule
- A When Rule is created with the following configuration:
Field Value Label CanViewLPDashboard Apply to Data-Portal (highest available unlocked Ruleset version) - On the Advanced tab, the condition type is set to expression evaluates to true with the following expression:
@Default.HavePrivilege(tools,"CanViewLPDashboard",.pxObjClass,myStepPage)
Task 4: Apply the When condition to the Web portal Dashboards
- In the Web portal, the Dashboards page in the Main navigation has its visibility condition set to evaluate the CanViewLPDashboard When Rule.
Directions
- Create a new Privilege named CanViewLPDashboard applied to Data-Portal as detailed in the Acceptance criteria.
- Open the
HRApps:ManagerAccess Role, edit the Data-Portal Access Role, and add the CanViewLPDashboard privilege with Level 5 as detailed in the Acceptance criteria. - Create a new When Rule named CanViewLPDashboard applied to Data-Portal, and then set the expression on the Advanced tab as detailed in the Acceptance criteria.
- Open the Web portal channel, navigate to Main navigation, and set the Dashboards page visibility condition to the CanViewLPDashboard When Rule as detailed in the Acceptance criteria.
Want to help us improve this content?