Users, Roles and Security Level

Hi,
I have created the roles and users in Users and Roles,
Now I want particular role or user to access a button on the page.

And it will be helpful if anyone can tell the difference between user role and security leve.

Thanks

Security levels is more like a hierarchical structure of access levels which includes User Roles.
You can learn more if you look at User Manual and/or Inductive University.
https://docs.inductiveautomation.com/display/DOC81/Security+Levels
https://docs.inductiveautomation.com/display/DOC81/Security+in+Perspective
And I highly recommend Security Hardening Guide.

It depends if it's Vision or Perspective, Inductive University has lessons on component security.

3 Likes

If your button is simply writing to a tag, I would set the write permissions on the tag itself and read the CanWrite property of the tag to set the enabled condition of the button.

If it's not that simple, then you can set the enabled binding to an expression that uses isAuthorized to check if the user has the right security level.

E.g.

isAuthorized(False, 'Authenticated/Roles/Operator')

Personally, I created a prop for each role in the session custom props that hold this, rather than having to write that function each time.
image

3 Likes

Every team should have a wine maker.

1 Like

Before the session params, too often it was a "Wind Maker" which isn't so desired :joy: