Manage menu in frontend module

Hi all,

I’m new in react technology so I’m not an expert.

I didn’t understand how react-core manages menu in frontend module. In web module the menu are filtered by screen permissions, but in frontend module this filters don’t work, in fact I view all menuItem inserted in routing.ts.

The question is: is possible to filter menu in frontend module as well as in web module?
Is there some documentation about this topic?

Thanks to all for support.

Hi @mnemonik83,

Screen permissions are applied to Generic UI screens. There are no screen-level permissions in Frontend UI (in fact, there is no “screen” abstraction).

There is a possibility to conditionally show content based on entity permissions, but right now you’ll have to do it manually. You can do it by using @cuba-platform/rest library:

  • CubaApp#getEffectivePermissions to load the permissions from backend
  • isOperationAllowed to check e.g. whether a user has read permission on a given entity

I’ve opened a feature ticket to provide a more convenient way to conditionally show menu items.