将isAdmin方法统一到SecurityUtils

This commit is contained in:
RuoYi
2026-01-04 15:26:52 +08:00
parent fdb1853a34
commit 98a8545ca0
9 changed files with 76 additions and 53 deletions

View File

@ -114,6 +114,16 @@ public class SecurityUtils
return passwordEncoder.matches(rawPassword, encodedPassword);
}
/**
* 是否为管理员
*
* @return 结果
*/
public static boolean isAdmin()
{
return isAdmin(getUserId());
}
/**
* 是否为管理员
*