Missing user roles in app compared to database table

0
When I receive all entries from System.UserRole in a Database viewer I get all user roles that I have defined in the application security settings. However, when I retrieve the list of user roles in the application. (List view; Datasource: Database; Entity: System.UserRole; No constraints), some roles are missing in the listing.   I would expect to receive all roles that are contained in the table.   Does someone know what causes this effect, and how to fix it?   (Studio Pro version: 9.24.17)
asked
2 answers
0

Hello Arne,

 

This is probably related to the fact that you currently have a userrole that is not allowed to manage (see) some specific roles.

 

This can be configured under Security > User Roles > Role x > User Management at the bottom.

 

A nice tool to help you figure out permission issues in the future, would be to use the Bizzomate Dev Tools. I can highly recommend this tool for all Mendix developers.

answered
0

Hi Arne,

There is an XPath constraint on which userroles a user is allowed to see. 

[System.UserRoles = '[%CurrentUser%]' or System.grantableRoles[reversed()]/System.UserRole/System.UserRoles = '[%CurrentUser%]']

So a user should either have that role themselves, or have management access of that role (the checkboxes on the bottom of the user role popup in project Security).

Hope that helps!

answered