How to add attributes to the Role entity?

0
I need to add some attributes to the user entity, but this whole domain model is not editable. I need to add several boolean attributes to the roles, the values of these booleans will control visibility and access rules for users on different pages. Usially we set it in Mendix, but in my case the Admin user have to be able to change the access rules for the roles through the interface, that’s why booleans would be a convenient option. I could add them to the role entity, or create a new entity and associate it with the Roles entity, but I can’t do it since this whole System Domain Model is non editable. What can be a solution or a workaround?
asked
3 answers
1

Hello Maxim,

                 You cannot change the system Domain Model. But you could inherit. Look at the Administration model which inherits from system.user . The same way you can use for your requirement. Hope this helps.

answered
1

Use inheritence and use that object to add the booleans. But do note that inheritence can impact performance so that might be something to check afterwards.

Regards,

Ronald

 

 

answered
1

Adding booleans to a user role is a slippery slope and circumventing default Mendix security, so not a best practice. I have seen this implemented several times, but it could always be solved by adding extra specific read roles in the needed modules.

So, my advice would be to not do this.  

answered