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.
Hi Wei Jie Sow,
Try this constraint
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.
I recommend making this a RULE. This way, you can use the same logic in decisions throughout the application.