31
Views
2
Comments
Creating Roles in runtime and viewing in Service Studio
Question

Hi everyone,

I am creating Roles using entity actions of Roles Entity in my back office screen.

I am able to Create and Delete the Roles and able to view them in Roles Entity and also in OutSystems Users Back Office, but I am unable to view the newly created roles in Service Studio.

Please suggest me on this, whether this is possible to view the roles in Service Studio and also suggest me is this a best practice to create roles in runtime ?

Regards,

Chandra Mouli

2023-04-13 07-10-08
Geertjan Jacobs

Hi @Yerra Chandra Mouli,

I would suggest to read up documentation about Roles such as:

https://success.outsystems.com/documentation/11/developing_an_application/secure_the_application/user_roles/ and

https://success.outsystems.com/documentation/11/developing_an_application/secure_the_application/user_roles/create_and_use_roles/ and

https://success.outsystems.com/documentation/11/developing_an_application/secure_the_application/user_roles/validate_end_user_permissions_in_the_application/

Roles are created at 'design time', so during developing in Studio. 

It is possible to create your own roles via your "back office" application (or via an external system such as Active Directory), but these cannot be used to set access to Screens or Human Activities.

In that case you need to define your own logic to check if User A has Role X to be used in for example authorization or aggregate filters.

I would advise to define all your possible roles in Studio and then list them in your back office app to be assigned to users. When assigning it, create a User_Role record for that particular user. Make sure to only list the roles not assigned to the user yet :).

2025-04-15 04-00-33
Prakhar Sharma

Hi @Yerra Chandra Mouli,

The roles which you create through runtime will be not visible on service studio to just check or uncheck them on a screen. You will need to define your own logic to manage the accesses of the screens or individual elements of the screens.

Thanks,

Prakhar Sharma

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