anderx пре 2 година
родитељ
комит
4d4759a507
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      src/main/java/com/goafanti/common/controller/BaseController.java

+ 2 - 3
src/main/java/com/goafanti/common/controller/BaseController.java

@@ -124,7 +124,8 @@ public class BaseController {
 		model.addAttribute("avatarUploadHost", avatarUploadHost);
 		model.addAttribute("portalHost", portalHost);
 		model.addAttribute("basePath", request.getContextPath());
-
+		model.addAttribute("shiro", SecurityUtils.getSubject());
+		model.addAttribute("isLogin", TokenManager.isLogin());
 		model.addAttribute("videoServer", videoServer);
 		model.addAttribute("isAdmin", false);
 		int yearCount=0;
@@ -134,8 +135,6 @@ public class BaseController {
 		if (TokenManager.isLogin() && TokenManager.getToken() instanceof User) {
 			model.addAttribute("userData", TokenManager.getUserToken());
 			model.addAttribute("userName", TokenManager.getUserToken().getNickname());
-			model.addAttribute("shiro", SecurityUtils.getSubject());
-			model.addAttribute("isLogin", TokenManager.isLogin());
 			model.addAttribute("csrf", TokenManager.getCSRF());
 		}