浏览代码

修正hasRole匹配为equals

JuJu 5 年之前
父节点
当前提交
8fdcd576c9

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

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