About Roles
You can create roles to define which users can access specific information. When you create a role, you create a category and a group within that category. You can create multiple categories containing multiple levels of groups.
Managing Access to Data Fields
Suppose you have created an application that provides the following details of users, and you want only the Finance personnel to view the salary details:- User name
- User ID
- Joining date
- Salary
- Create a category named Department.
- In the Department category, create a group named Finance.
- Modify the Roles Conditions section of the query that fetches the user account details as follows:
- In the Entity field box, select the field that stores the salary details.
- In the Access box, select Permitted Roles.
- In the Roles box, expand the Department category, and select the check box corresponding to the Finance group.
- Save the query.
When the query is run, the user name, user ID, and joining date details are returned to all users. However, users who belong to the Finance department will also see the salary details.
Managing Access to Data Rows
Suppose you have created an application that provides the following details of users, and you want all users to only see rows from their location:- User name
- User ID
- Joining date
- Salary
- Location
- Create a category named Locations.
- In the Location category, create groups for each location.
- Modify the Roles Conditions section of the query that fetches the user account details as follows:
- In the Apply conditions to section, select All roles.
- In the Row visibility box, select Filter rows.
- In the Entity field box, select the field that stores the location of the user.
- In the In user’s role tree box, select the Locations category.
- Save the query.
When the query is run, users will only see records where the Location field matches the Location role that has been allocated to them.