Simple Menu Bar different items for different roles

0
Hi, I’m trying to set up a different simple menu bar on a PWA. I want two different user roles to have different options on the menu bar, while they do have access to all items. So, user A needs to have item X on his menu bar; user B needs to have item Y on his menu bar. However, user A still needs access to item Y, and user B still needs access to item X. They're just not used that often, so shouldn't be on the menu bar as there is not enough room for all possible pages the users can go to. How do I go about doing this without creating double pages and give those access rules?   Mendix version is 9.24.4 but that is not an option to pick.
asked
2 answers
1

Hi Lucas,

You have many options to achieve this, depending on what you prefer. The most optimal are probably:

  • Replace the simple menu with buttons and use conditional visibility
  • Call microflows from the menu that open the corresponding page and apply access to those microflows. That’ll prevent you from having to duplicate the page

Hope that helps. 

answered
1

Hello Lucas

 

Maybe you can use the IfElse widget and configure the desired “If” condition in the widget. See the link below:

https://vstram.medium.com/the-ifelse-widget-mendix-303bc0bbfe7d

 

As an example of “If” condition:

 

$currentObject/Name = 'Some name' and ($currentObject/SearchChangedDate > [%BeginOfCurrentDay%] or $currentObject/SomeAssociatedEntity != empty)

 

 

answered