Skip to content

Commit

Permalink
fix: 修复是否为管理员判断错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Sep 6, 2023
1 parent 609c49b commit 31f0abb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ public class LoginUser implements Serializable {
* @return true:是,false:否
*/
public boolean isAdmin() {
if (CollUtil.isEmpty(roles)) {
if (CollUtil.isEmpty(roleCodes)) {
return false;
}
return roles.contains(SysConsts.ADMIN_ROLE_CODE);
return roleCodes.contains(SysConsts.ADMIN_ROLE_CODE);
}
}

0 comments on commit 31f0abb

Please sign in to comment.