View only user on client

Hello,

Is it possible to make a user that only has rights to view the screen?
I have a client who didn’t set up the security level’s like they should have.
At the moment the option “Inherit Permissions” is not used at all.

Do I have an option to skip this? Where for example there is a user that has “read-only” mode but not read-write.

I was thinking about making a user “ReadOnly”. Then I would edit a client-event script to say
if: u"ReadOnly" in roles:
system.util.setConnectionMode(2)
else:
system.util.setConnectionMode(3)

I got this from site below;
https://docs.inductiveautomation.com/display/DOC/Setting+Client+Read-Only

I’m just making sure if there is an easier way to do this?

Thanks in advance!

Any information on this?

I tried the following but it does not work:

Client script on tag value change
On tag change: [System]Client/User/Username i call script
project.Security.ReadOnly()

Scrip Readonly
def ReadOnly():
name = system.security.getUsername()
if name == ‘User’:
system.util.setConnectionMode(2)
else:
system.util.setConnectionMode(3)

Any ideas how i get a read only user?
Thanks

I just did it in Client Events - Startup

if system.tag.readBlocking(['[System]Client/User/RolesString'])[0].value == 'ReadOnly':
	system.util.setConnectionMode(2) #2=ReadOnly
else:
	system.util.setConnectionMode(3) #3=ReadWrite
1 Like