Is there any function to find out if the current logged in user has administrator role

  HI,   I wanted to make attributes of entity editable or not depending of the role   Since I cannot do it the above property , I have created the microflow below I just need to know how to find out what role the current logged in user is? Please advise
2 answers


Mendix has a couple of ways built into the platform that will enable you to do this without microflows:

  1. on the page (in fact in the dialog box you included in your post), click the Conditionally radio button in the Editable section.  Then click the Edit button to edit the condition.  In the pop up window you’ll see, there is an option to make the attribute editable based on one or more user roles.
  2. You can also set permissions on the entity itself.  In your domain model, double click on an entity to open the properties window, click on the Access Rules tab.  On this tab you can define rules for what user roles have create, delete, read and edit permissions for each entity and for attributes of that entity.  Setting permissions on the entity means that those security restraints will carry over to all pages in the application.  So if you give Administrators only the permission to edit an attribute and other user roles permission to view that same attribute, when you put that attribute on a page, those permissions will be enforced by Mendix without any additional action on your part.

Hope that helps,




Option 1: