KB-29797: Restricting a users group interaction with screen objects.

Question:

How can I limit the access of a certain user group to a certain screen object?

Solution:

This can be done via a script that, executed preferably at Viewer‘s OnLogin event, checks via Viewer‘s IsUserMemberOfGroup method whether the logged user belongs to the group allowed to access the object. 

Example:

  1. Create an Internal Tag at the application’s Viewer.
  2. Run IsUserMemberOfGroup method (at Viewer‘s OnLogin method), attributting its return to the Value property of the previously created Internal Tag:

    Item(“ViewersInternalTagName”).Value = IsUserMemberOfGroup(“GroupName”)


  3. Link the Visible property of all screen objects whose access must be limited to the Internal Tag’s Value property. 
Since IsUserMemberOfGroup method returns True or False depending on the user group logged in, the screen objects linked to Visible property will only be shown to users belonging to the group being tested in this method. For other users, the objects don’t appear on screen.

NOTE:
If you prefer to maintain all objects visible on screen and change only how each user group can interact with them, just use Enabled property instead of Visible in item 3.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

Deixe seu Comentário

Seu endereço de e-mail não será publicado. Campos marcados com asterisco são obrigatórios *