How to display or hide the menu on runtime, based on the role of the user?
Use the action Check<YourRole>Role action that's available above the Role on the Roles Folder.
- The input UserId can be the Session.UserId to validate the permissions of the user logged into your application.
- The output Has Role can be used as the condition of an If widget.
The action receives a UserId and has the output HasRole that determines whether the user
For example, you can just drag the entity CheckOrderManagerRole to the Preparation action of your Menu. Select the UserId to validate the role.
Then, use the output of the action inside an If widget to control whether the MenuItem is going to be displayed.