Browse Source

修正hasRole匹配为equals

tags/v2.3.0
JuJu 4 years ago
parent
commit
8fdcd576c9
  1. 2
      ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/PreAuthorizeAspect.java

2
ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/PreAuthorizeAspect.java

@ -168,7 +168,7 @@ public class PreAuthorizeAspect @@ -168,7 +168,7 @@ public class PreAuthorizeAspect
}
for (String roleKey : userInfo.getRoles())
{
if (SUPER_ADMIN.contains(roleKey) || roleKey.contains(role))
if (SUPER_ADMIN.equals(roleKey) || roleKey.equals(role))
{
return true;
}

Loading…
Cancel
Save