I'm trying to hide a tab if the admin logged don't have the permission required. For now, i saw that is possible to hide a section or a complete module but i haven't seen an example to hide only an element in the view.
Below, what i have done in MyCustomerView :
Code: Select all
AdminUser loggedAdmin = SecurityManager.USER;
if(loggedAdmin.getPermissions().contains("PERMISSION_ALL_ACCOUNT")){
topTabSet.addTab(accountTab);
}
It works but is there an other mean to achieve that? Because if in permission management section we modify the name of this permission it will no longer work...