Is there a way to create/grant user roles/access dynamically?

I want to create/grant user roles dynamically to pages on runtime. Is there a way to do this? Or can it only be done during development?


You could create logic to make this happens, making a screen with an option to do that, using Grant /revoke actions applied to an user.

Thanks and Best Regards,

Nuno Pereira

Hi JD Tulio,

As per my understanding, access to Web Screens is configured at design time, when you check, check boxes for Roles per Web Screen:

Regards

Pratham

Solution

Hi JD Tulio,

In outsystems you need to define the roles at the time of development and based on roles you can define the page level access as  mentioned by Pratham. If you want to grant or revoke any role access to any user , then that can be achieved using the build in function within the defined role (these function is auto generated when you define a role).

If you want to want to create the role dynamically and control the access/User level functionality , then in that case you cannot make use of outsystems role/access functionality . You need create the whole logic by yourself .That is , you need to define entities that will store you role , role-user mapping & role access level. Also for granting or revoking page level you need to define some function that will check the user based role access ( it will be check in preparation of the page).

In short , you have to create the role/user/page access logic by yourself.

Hope you got it.  :)

Solution

Pranav Pandey wrote:

Hi JD Tulio,

In outsystems you need to define the roles at the time of development and based on roles you can define the page level access as  mentioned by Pratham. If you want to grant or revoke any role access to any user , then that can be achieved using the build in function within the defined role (these function is auto generated when you define a role).

If you want to want to create the role dynamically and control the access/User level functionality , then in that case you cannot make use of outsystems role/access functionality . You need create the whole logic by yourself .That is , you need to define entities that will store you role , role-user mapping & role access level. Also for granting or revoking page level you need to define some function that will check the user based role access ( it will be check in preparation of the page).

In short , you have to create the role/user/page access logic by yourself.

Hope you got it.  :)

Yep! Thanks Pranav!


Hi JD Tulio,

Happy to help. I think you marked your reply as the solution :)

I marked your answer as the solution, Pranav. 

Cheers. 

Thank you Eduardo  :)

Great Pranav Pandey