Screen - Not Allow - Show Menu - Access Denied

Hi,

I want to customized the security module in such a way that for the screens which are not allowed, menu should be shown with Access Denied message upon click.

Can I override this functionality? How?

Thanks,
Hari

Hi,
Technically it is possible, but such possibility wasn’t foreseen in the menu architecture.
Implementing your requirements will require you to investigate implementation details of the platform, override platform logic and copy some code to your project.

Note that CUBA team doesn’t recommend such invasive intervention into platform mechanisms.

Classes you need to look at:

  • AppMenu component - com.haulmont.cuba.web.gui.components.mainwindow.WebAppMenu
  • MenuBuilder - prototype Spring bean that builds menu structure (and omits not-permitted menu items) - com.haulmont.cuba.web.sys.MenuBuilder

How to register extended app menu component - see here: Integrating a Vaadin Component into the Generic UI - CUBA Platform. Developer’s Manual