Sprintr Application Role Settings

2
Hi, I am trying to implement something similar to what has been done in the sprintr, where you are able to add new project roles and edit the roles permissions. I have an idea in mind where every permission in the below table would consist of a user role in the project. Once the user clicks 'Save', these user roles will be associated to that project role entity and then the project role will be assigned to the user; hence the user will get these user roles. But would that be the ultimate solution?
asked
1 answers
0

I'm not sure how this is done in Sprintr, but I would setup a new entity called something like ApplicationRoleSet. This entity would have a name and a configuration for the user roles that you want to assign.

I see two ways of doing this, having a ReferenceSet to the Mendix User Role table and using a ReferenceSetSelector, or maybe an appstore widget such as the CheckBoxSetSelector to let the user select all user roles.
In this case you do have to worry about the grantable in your project Security, since you can only see and configure the roles you can grant. (Because of this I probably would choose the second option).

Option 2 is that you create a checkbox for each user role that is configurable, so in the case of Sprint 8 booleans, each boolean represents a userrole in your project security.
When saving this configuration, you'll run a microflow that evaluates all booleans if the boolean is true retrieve and store these user roles in a referenceSet to userrole for easy access later on.

When creating a new user, or after updating this configuration you can set the User_UserRole association with the contents of the ApplicationRole_UserRole reference set.

answered