|
|
@ -44,14 +44,14 @@ public class MenuServiceBean extends AbstractServiceBean implements MenuService
|
|
|
|
List<String> actions = currentUser().getAccessibleActions();
|
|
|
|
List<String> actions = currentUser().getAccessibleActions();
|
|
|
|
List<Menu> topMenus = getMenuContext().topElements();
|
|
|
|
List<Menu> topMenus = getMenuContext().topElements();
|
|
|
|
|
|
|
|
|
|
|
|
List<DataObject> accessible = new ArrayList<>();
|
|
|
|
List<DataObject> userMenus = new ArrayList<>();
|
|
|
|
for (Menu menu: topMenus) {
|
|
|
|
for (Menu menu: topMenus) {
|
|
|
|
DataObject dataobject = menu.toDataObject(actions);
|
|
|
|
DataObject dataobject = menu.toDataObject(actions);
|
|
|
|
if (dataobject != null)
|
|
|
|
if (dataobject != null)
|
|
|
|
accessible.add(dataobject);
|
|
|
|
userMenus.add(dataobject);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return accessible;
|
|
|
|
return userMenus;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|