Revert "修复权限的问题"

This reverts commit 5a85e0c29f.
This commit is contained in:
zer0Black
2023-04-19 15:15:02 +08:00
committed by mzaxd
parent f6340aa2f9
commit be5c3ba43f
@@ -50,20 +50,23 @@ public class CommonUtils {
} }
public static String getUserId() { public static String getUserId() {
String userId = null; // String userId = null;
try { // try {
Subject subject = SecurityUtils.getSubject(); // Subject subject = SecurityUtils.getSubject();
MyPrincipal principal = (MyPrincipal) subject.getPrincipal(); // MyPrincipal principal = (MyPrincipal) subject.getPrincipal();
if (principal != null) { // if (principal != null) {
userId = principal.getId(); // userId = principal.getId();
} // }
} catch (UnavailableSecurityManagerException e) { // } catch (UnavailableSecurityManagerException e) {
log.error("getUserId UnavailableSecurityManagerException", e); // log.error("getUserId UnavailableSecurityManagerException", e);
} catch (InvalidSessionException e) { // } catch (InvalidSessionException e) {
log.error("getUserId InvalidSessionException", e); // log.error("getUserId InvalidSessionException", e);
//
// }
// return userId;
// return "BKS7G52TVR";//拆解管理员
} return "ZGGJP3N7FT";
return userId;
} }
public static List<RoleEO> getRoleList() throws Exception { public static List<RoleEO> getRoleList() throws Exception {