I have a method which calls different MenuItems, depending on parameters:
e.g.
new MenuFunction(menuitemActionStr(MenuItemToCall), MenuItemType::Action).run(args);
Will it be automatically checked if the current user has permissions to open/run the various menu items? If not, how can I check by code the privileges of the user/ the needed permissions of the menu item?
1) Yes, it will be automatically checked whether the current user has permissions to open/run menu items.
2) You can use following methods from the Global
class:
boolean hasMenuItemAccess(MenuName name, MenuItemType type)
boolean hasMenuItemSecurityAccess(MenuFunction _menu)