Assigning roles to user in a webscreen

Assigning roles to user in a webscreen

  

We create roles in the service studio and assigning roles to a user is done in service center.

Instead of going to service center to assign roles, I want to do it my webscreen itself. 

How to do it?


Ananth wrote:

We create roles in the service studio and assigning roles to a user is done in service center.

Instead of going to service center to assign roles, I want to do it my webscreen itself. 

How to do it?


Hi Ananth,

It depends how you want to design your screen(UI), you can use systems tables(ossys_role,ossys_user_role). Also can use it's method grant access or revoke acess.


Sachin

Ananth wrote:

We create roles in the service studio and assigning roles to a user is done in service center.

Instead of going to service center to assign roles, I want to do it my webscreen itself. 

How to do it?



Hi ananth,

the best and easy way to assign the roles by staying at the web screen is to use the built-in Outsystem roles action for example if you want to assign the employee role to user, you will be using this action in the Logic tab and roles sub-tree like GrantEmployeeRole(). And the userId will be passed in the action properties as input parameter.

this is used when you want to grant the outsystems built-in roles otherwise you can only use the boolean field of the entity to assign the roles.

Let me know if there is any confusion.

Hope this will help you.


Cheers