diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java index 2b7ad7ebb..f369807d0 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java @@ -109,7 +109,7 @@ public class PermissionService for (SysRole sysRole : loginUser.getUser().getRoles()) { String roleKey = sysRole.getRoleKey(); - if (SUPER_ADMIN.contains(roleKey) || roleKey.contains(StringUtils.trim(role))) + if (SUPER_ADMIN.equals(roleKey) || roleKey.equals(StringUtils.trim(role))) { return true; } @@ -164,6 +164,6 @@ public class PermissionService */ private boolean hasPermissions(Set permissions, String permission) { - return permissions.contains(ALL_PERMISSION) || permissions.contains(StringUtils.trim(permission)); + return permissions.contains(ALL_PERMISSION) || permissions.equals(StringUtils.trim(permission)); } }