use of org.broadleafcommerce.openadmin.server.security.domain.AdminModuleDTO in project BroadleafCommerce by BroadleafCommerce.
the class AdminNavigationServiceImpl method populateAdminMenu.
protected void populateAdminMenu(AdminUser adminUser, AdminMenu adminMenu, List<AdminModule> modules) {
for (AdminModule module : modules) {
List<AdminSection> authorizedSections = buildAuthorizedSectionsList(adminUser, module);
if (authorizedSections != null && authorizedSections.size() > 0) {
AdminModuleDTO adminModuleDto = ((AdminModuleImpl) module).getAdminModuleDTO();
adminMenu.getAdminModules().add(adminModuleDto);
adminModuleDto.setSections(authorizedSections);
}
}
// Sort the authorized modules
BeanComparator displayComparator = new BeanComparator("displayOrder");
Collections.sort(adminMenu.getAdminModules(), displayComparator);
}
Aggregations