To understand better the Hierarchical Roles concept and how to do it, please check the article How to leverage OutSystems roles with hierarchy levels at OutSystems official documentation page.
OutSystems Roles are very useful and easy to use. You can create authorization mechanisms in a matter of minutes with the out-of-the-box roles.
When developing an application you must secure it, allowing or restricting end-user access to specific screens of your application. Roles are often used for:
Authorization mechanisms at screen level: who accesses what screens
Controlling displayed information: who sees what inside a screen
Controlling available actions: who can update/insert/delete what
It's not uncommon for development teams to face business requirements to implement more sophisticated access control and complex authorization mechanisms. Frequently, those requirements translate into an authorization model organized as a hierarchy.
Consider a factory and its different roles: they're organized hierarchically:
Operative > Supervisor > Production Manager > General Manager Operations > CEO
The scenario above requires you, a developer, to implement a hierarchy of roles. OutSystems Roles, as you know them, don’t allow the creation of a similar structure with built-in capabilities. However, you can implement this hierarchical structure by extending the OutSystems Roles. In this set of articles, you are going to learn how to do so.
This sample app will guide you on how to implement a scenario where Hierarchical Roles are needed. It is composed by 2 apps:
- Hierarchical Roles app - The backoffice where roles and hierarchies are defined
- Sales app - The demo application where the hierarchy concept is implemented.
Take a look at the OutSystems official documentation, the How to leverage OutSystems roles with hierarchy levels article has all the necessary information about this topic.