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() {
String userId = null;
try {
Subject subject = SecurityUtils.getSubject();
MyPrincipal principal = (MyPrincipal) subject.getPrincipal();
if (principal != null) {
userId = principal.getId();
}
} catch (UnavailableSecurityManagerException e) {
log.error("getUserId UnavailableSecurityManagerException", e);
} catch (InvalidSessionException e) {
log.error("getUserId InvalidSessionException", e);
// String userId = null;
// try {
// Subject subject = SecurityUtils.getSubject();
// MyPrincipal principal = (MyPrincipal) subject.getPrincipal();
// if (principal != null) {
// userId = principal.getId();
// }
// } catch (UnavailableSecurityManagerException e) {
// log.error("getUserId UnavailableSecurityManagerException", e);
// } catch (InvalidSessionException e) {
// log.error("getUserId InvalidSessionException", e);
//
// }
// return userId;
// return "BKS7G52TVR";//拆解管理员
}
return userId;
return "ZGGJP3N7FT";
}
public static List<RoleEO> getRoleList() throws Exception {