Grantable roles for multitenant

Hi, we have the following situation for our multitenant application.   There are 3 main roles within most SME's logistics. Dispatch Driver Invoicing This is okay if everyone has only 1 role (which most have). Is there a way to assign roles via the front end, so certain users can have dispatch and driver powers, and have this translate back into the domain security?
1 answers

If you look at the system model you would see that the reference between User en UserRole is a multiple multiple one. So a user can have multiple roles which stack. So as long as you model your three roles correctly and have the right accessrules in place I see no problem for stacking roles.

Do note that in a multi tenant environment and you want to enable for your tenants to allow them to change the roles for their users you should model that out in UserRole shadow entities and use microflows to set the actual roles based on those shadow entities.