Custom Menu depending on user role

Hi,

would like to point to different web-menu.xml files depending on the user role. Any ideas?
Alternatively I may extend the MainScreen and adapt the menu to the given logged in role. However the first approach looks neater to me.

Many thanks in advance.

Carlos.

Hi @carloscz25 ,

Cuba is supporting you by two types of menu SideMenu and AppMenu

you can add all your menu items inside any of them and control access to show and hide according to role permission

You still have the option to implement your own custom menu at run time and append all menu items at run time according to each user role permission

Another way if you want to implement your own custom-menu the same has been done inside sampler demo application sampler-github-link you can follow the steps their

Also i have implemented custom menu display that contian both AppMenu and SideMenu on which the AppMenu controll what is displayed inside SideMenu AppMenu-SideMenu

here how it will looks like post-appmenu-sidemenu

Thanks

1 Like

Hello @carloscz25

You can manage menu items visibility via Role settings: Documentation

Regards

Thank you both.

You are absolutely right Daniil. I read about it in the documentation. Should have remembered it.

Thanks.

Carlos.