231
Views
4
Comments
Solved
Roles
Question
Hi,

in my application , I have a page where I allow users to create new roles . However when I publish, field of the Role table " is_active " becomes " False" when it should be "True" . Any tips that I can be useful ?

Thank you

2019-10-21 11-16-58
Joel Francisco
Solution

Hello Diogo,

In runtime is not possible to change the role.

2025-11-19 06-14-01
Miguel Verdasca
Champion

Joel Francisco wrote:


Hello Diogo,

In runtime is not possible to change the role.


Hello guys,
Please note that this information is incorrect. It's possible to assign and remove roles at run-time, please refer to this link: https://success.outsystems.com/Documentation/11/Developing_an_Application/Secure_the_Application/User_Roles/Create_and_Use_Roles

Roles in OutSystems are application-specific. Although it seems possible to dynamically create them (the Role entity is available and exposed read/write) you still would not be able to use any of the built-in functionality of the platform to check whether users have the roles or not.


You could 

1. Create a different OutSystems Role for each web screen (or set)

2. Have the admin create whatever Groups they thought necessary

3. Allocate the Roles to Groups

4. Allocate the Users to Groups (giving them access to the desired screens)

You can have as many Roles and Groups as you like, with a slick interface it would be manageable.


You can do that by using the Roles as low-level access to screens / actions and Groups to define sets of roles and assign them to users.

This can be done trough the Users application or in your own application as Groups can have custom management. Please check Organize Roles in Groups and Customizing Groups.



Cheers,
Nuno Verdasca





2017-10-09 20-45-22
André Siébra
Hi Diogo,

It seems that every time you publish the module, the platform updates the IsActive attribute to false of the records in the Role entity that were not created at design time. I don't know if it is a bug or I missing something... but this is what happens.


UserImage.jpg
Diogo Silva
Thanks André Siébra
2019-10-21 11-16-58
Joel Francisco
Solution

Hello Diogo,

In runtime is not possible to change the role.

2025-11-19 06-14-01
Miguel Verdasca
Champion

Joel Francisco wrote:


Hello Diogo,

In runtime is not possible to change the role.


Hello guys,
Please note that this information is incorrect. It's possible to assign and remove roles at run-time, please refer to this link: https://success.outsystems.com/Documentation/11/Developing_an_Application/Secure_the_Application/User_Roles/Create_and_Use_Roles

Roles in OutSystems are application-specific. Although it seems possible to dynamically create them (the Role entity is available and exposed read/write) you still would not be able to use any of the built-in functionality of the platform to check whether users have the roles or not.


You could 

1. Create a different OutSystems Role for each web screen (or set)

2. Have the admin create whatever Groups they thought necessary

3. Allocate the Roles to Groups

4. Allocate the Users to Groups (giving them access to the desired screens)

You can have as many Roles and Groups as you like, with a slick interface it would be manageable.


You can do that by using the Roles as low-level access to screens / actions and Groups to define sets of roles and assign them to users.

This can be done trough the Users application or in your own application as Groups can have custom management. Please check Organize Roles in Groups and Customizing Groups.



Cheers,
Nuno Verdasca





Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.