mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-08 21:37:42 +00:00
update 使用 satoken 自带的 BCrypt 工具 替换 Security 加密工具 减少依赖
This commit is contained in:
@@ -118,4 +118,19 @@ public class LoginHelper {
|
||||
return UserType.getUserType(loginId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为管理员
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public static boolean isAdmin(Long userId) {
|
||||
return userId != null && 1L == userId;
|
||||
}
|
||||
|
||||
public static boolean isAdmin() {
|
||||
Long userId = getUserId();
|
||||
return userId != null && 1L == userId;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user