I have a Menu (LRCEmployeeMenu) with items and want to display one specific item based on the actor having a specific role (EmpCustomRole). How do I approach it?
Thanks
another option is to create a condition on the actor business class with the necessary roles, and then use it within a visible when statement on the menu
visible when (actor.agent(Actor).ZZShowBenefitDates)
Have you already implemented UI Access Policies? If so, you likely just need to create a UI policy for the WebApp / Custom Role and hide any unneeded elements for that role. If you don't want the menu item to appear for other roles you just need to hide it in the UI policies for those other roles.
Andy - see lines 20-21
Restricting access to menu items is useful (it simplifies the UX/UI), but realize that it isn't much of a security boundary in and of itself.
If the sum total of all security classes associated with all roles that a user has grants access to the target of the menu item then they can potentially access and interact with that business class/task via alternate means (such as a direct link / shared or bookmarked URL, search, ISD, Landmark APIs, etc.)
adendrag - I can't see the full LPL code because the pic is maximized. Can you place the code here?
It would just look like this:
Actor is a BusinessClass owned by person Conditions ZZShowBenefitDates when (actor has role "Admin_ST" or actor has role "YourCustomRole1" or actor has role "YourCustomRole2")
If all you want to do is customize the menu and conditionally hide a menu item, you can use the "visible when" directive on the menu item. I believe and ActorCondition is a simple condition so you probably don't need to create a condition field.
Risk Management visible when (actor has role "EmpCustomRole") list is Employee.RiskManagementEmployeeListWCHN
However, as Michael Cleverly noted restricting UI access is not the same as restricting functional access so you want to keep that in mind anytime you are making changes like this.
Thank you ALL very much for the help
I think the simplest and less long term tech debt solution to hide/show menu items by Role is to use and implement UI Access Policies.
Dr Awesome - I am on V11 Single Tenant and UI Access Policies do not exist