Decision using user role

0
Is that had any idea for do the decision by using user role
asked
3 answers
0

Hi wei,

       could you explain the question elaborately

 

Mendix allows you to set permissions for different entities based on user roles. This means that certain data entities can only be accessed, modified, or deleted by users with specific roles.

  • For example, only "Manager" roles may be able to edit project details, while "Employee" roles can only view them.
answered
0

Hi Wei Jie Sow,

 

Try this constraint 

image.png

answered
0

You could check whether the current user has a specific userrole associated.

First, you do a retrieve retrieve with 2 criteria:

1. The user associated with the userrole is the current user

2. The id matches the token of the userrole you want to check

 

Next, you can even use a count + check on count>0 to make the retrieve optimized.

image.png

 

I recommend making this a RULE. This way, you can use the same logic in decisions throughout the application.

answered