use of org.broadleafcommerce.openadmin.server.security.domain.AdminModule in project BroadleafCommerce by BroadleafCommerce.
the class AdminLoginController method loginSuccess.
@RequestMapping(value = { "/", "/loginSuccess" }, method = RequestMethod.GET)
public String loginSuccess(HttpServletRequest request, HttpServletResponse response, Model model) {
AdminMenu adminMenu = adminNavigationService.buildMenu(getPersistentAdminUser());
if (!adminMenu.getAdminModules().isEmpty()) {
AdminModule first = adminMenu.getAdminModules().get(0);
List<AdminSection> sections = first.getSections();
if (!sections.isEmpty()) {
AdminSection adminSection = sections.get(0);
return "redirect:" + adminSection.getUrl();
}
}
return "noAccess";
}
Aggregations