|
@@ -39,12 +39,7 @@ public class MainController {
|
|
|
|
|
|
|
|
@RequestMapping("/admin")
|
|
@RequestMapping("/admin")
|
|
|
public ModelAndView admin(HttpServletRequest request) {
|
|
public ModelAndView admin(HttpServletRequest request) {
|
|
|
- Subject subject = SecurityUtils.getSubject();
|
|
|
|
|
- if (subject.hasRole("admin")) {
|
|
|
|
|
- return new ModelAndView("html/admin.html");
|
|
|
|
|
- } else {
|
|
|
|
|
- return new ModelAndView("redirect:/loginAdmin");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return new ModelAndView("html/admin.html");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping("/loginAdmin")
|
|
@RequestMapping("/loginAdmin")
|