Currently you must configure the Roles that can access a screen. OutSystems will take care of the security aspect and a person gets access or not. I would like to suggest the same RBA mechanic for all Actions.
Why
If you want that a certain action is only usable by people with a certain role then you need to code this in the action itself. This will take at least 2 action steps (the check and the resolution). This check will be repeated on each affected action making a lot of duplicate code. Code that does not assist in the primary goal of the action and are therefor nothing more than screen space waste and a distraction.
It would make actions more readable and better manageable if we can enable RBA for actions and then specify the allowed roles inside the properties of the action, just like we do with screens.
An other nice perk by doing it this way is that we, the developers, can always be sure that the security is implemented correctly. This will free up testing resources.
On What
RBA on Actions should be available on;
- All public actions.
- All actions that are referenced from screens or blocks as these are called from an unsafe (web / mobile) environment.
RBA on Actions could be available on;
- Any other action where the developer deems in necessary to configure this.
The transition
This does not have to be a breaking change. If you implement is just like screens than the default access would be "registered" and that will allow all logged in users to call the action. Only for apps that have anonymous access you will need to take action by enabling anonymous access for the affected actions. An environment toggle (in Lifetime for example) could enforce to default enablement or the Anonymous role as well.
You can then migrate from the code-based RBA to the now native RBA in upcoming refactors or maintenances.
Does this mean that I never have to check for roles again?
No, It will still be needed to check for roles in actions that, for example, manage a flow (orchestration). It could be that if the user has a certain role that we need to make some audit logging or enable other features. This will require us to still be able to perform manual checks of roles.