+1

Condition using user rights

Grzegorz Kulinski 4 years ago in bOS Configurator / Tasks 0

Hi.

Is it possible to build a program based on the user rights condition?

The topic concerns air conditioning in the office. AC control is available from the KNX wall thermostats and from the visualization. Administrator has the option to lock thermostat on the wall to prevent office staff from changing some AC functions. At the same time, the same functions are available on the visualization for both regular users and the administrator.

My point is to block the execution of program (linked to the button on the visualization and KNX thermostat) by regular users, and allow execution only by users with administrator rights, without need to duplicate the button and program linked to it. I would like to include two conditions in the program that determine the ability to run the program.

Something like this:
If <thermostat> = blocked
     If <user_rights> = administrator
          <program_name_2>.Run()
     Else <user_rights> = user
          <program_name_3>.Run()
Else
     <program_name_1>.Run()

Regards,
Grzegorz