|
Hi I have problems with the Permission filter , I have used public class CustomePermissionsAdapter implements
PermissionsAdapter { private ArrayList menuNames; public CustomePermissionsAdapter(String theMenuNames[]) { menuNames = new ArrayList(); if(theMenuNames != null) { for(int i = 0; i < theMenuNames.length; i++) { menuNames.add(theMenuNames[i]); } } } public boolean isAllowed(MenuComponent menu) { return !menuNames.contains(menu.getName()); } } And in if (menus != null) { for (int i = 0; i < menus.length; i++) System.out.println("Dont show this
[" + i + "]" + menus[i]); } PermissionsAdapter permissions = new
CustomePermissionsAdapter(menus);
request.setAttribute("permissionAdapter", permissions); But in the isAllowed method only 2 menus are fired up the 2
first , the menu looks like this File è A Ø B Ø C Ø D Only File and A are fired in isAllowd method so I can’t
filter B,C or D Best Regrds |
