I wanted to share some insights and seek clarification on the topic of User Roles and Security Levels in Ignition, as I have found it to be quite confusing. I hope this example will help illustrate the challenges I've encountered.
Access Matrix Example
Here is a simplified access matrix for my project:
Two role created:
- OperateGroup1
- OperateGroup2
Two user created and assign to sepecific group.
-
User1 : Assign to Role: OperateGroup1
-
User2 : Assign to Role: OperateGroup2
-
View1 Page: All users can load the view. No specific view permission is set up.
- View1 Button: User1 can operate the button. The button's enable binding is set up with the
isAuthorized
expression.
- View1 Button: User1 can operate the button. The button's enable binding is set up with the
-
View2 Page: Allow User2 can load the view, but User1 cannot. I try to use View permission , but realized it only allows selection from security levels, which I initially did not plan to use.
The Confusion
When using the isAuthorized
expression, I noticed that I have to include the prefix Authenticated/Roles/
in the expression like this: isAuthorized(true, 'Authenticated/Roles/OperateGroup1')
. However, I did not create this security level explicitly. This raises a few questions:
- Why is the
Authenticated/Roles/
prefix necessary?
- It seems that without this prefix, the
isAuthorized
expression does not work as expected. Is this a default requirement in Ignition?
- Creating Security Levels:
- When creating security levels, I noticed that I cannot select from existing user roles. The creation of rules seems arbitrary and not directly linked to user roles. Is there a relationship between user roles and security levels that I am missing?
Refer to below screenshot, I haven't create any security level yet.
Seeking Clarification
I would appreciate any insights or explanations from the community or the Ignition team regarding the following:
- The necessity and function of the
Authenticated/Roles/
prefix in theisAuthorized
expression. - Best practices for setting up security levels and their relationship with user roles.
- Any tips or resources that could help clarify the setup and management of user roles and security levels in Ignition.