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
In this case, you will perform the following tasks:
  1. Create a category named Department.
  2. In the Department category, create a group named Finance.
  3. Modify the Roles Conditions section of the query that fetches the user account details as follows:
    1. In the Entity field box, select the field that stores the salary details.
    2. In the Access box, select Permitted Roles.
    3. In the Roles box, expand the Department category, and select the check box corresponding to the Finance group.
    4. 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
In this case, you will perform the following tasks:
  1. Create a category named Locations.
  2. In the Location category, create groups for each location.
  3. Modify the Roles Conditions section of the query that fetches the user account details as follows:
    1. In the Apply conditions to section, select All roles.
    2. In the Row visibility box, select Filter rows.
    3. In the Entity field box, select the field that stores the location of the user.
    4. In the In user’s role tree box, select the Locations category.
    5. 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.