Skip to main content
OutSystems

How to grant temporary roles to users

Question

Can I give roles temporarily to the user that is currently logged in?

Answer

You must grant the user the temporary roles when needed, and revoke the roles later.

You may grant temporary roles to the user on your Login action:

temporary roles.png

As an alternative, you may grant temporary roles to the user on the system event OnSessionStart. This event occurs after the end-user logs in to the application.

temporary roles2.png

You can revoke the temporary user roles when the user logs out of your application.

temporary roles3.png

Make sure to check whether the user still needs the temporary roles when he logs in again.

However, if there is no explicit logout from the user, the user will maintain the roles when he tries to log in. If needed, revoke the roles from the user during the next login.

  • Was this article helpful?