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

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.


Thanks André Siébra
Solution

Hello Diogo,

In runtime is not possible to change the role.

Solution

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