Restricting access by user role
You can hide a report or restrict visibility of a report based on a user's role. This is done by setting a value in the AllowedRoles field of the ContentObjs table in the plan's relational database.
The AllowedRoles field is an integer that is evaluated to determine if the current user's role is included. The value for the role is set in the RoleStyles table in the RoleIndicator field. These are the values for the default roles:
- Administrator: 1
- Planner: 2
- Supplier: 4
- Reader: 8
For example, if a report should only be available to administrators and planners, set the AllowedRoles field in the ContentObjs table to 2.
If more than one role should see the report, then the RoleIndicator values are combined. For example, the value for all roles to see a report is 14 ( 2 + 4 + 8). When adding new roles to the RoleStyles table, the RoleIndicator field needs to be double the last field.
Regardless of the value in the AllowedRoles field of the ContentObjs table, a report that is an "edit" style report cannot be viewed by readers.