权限调整

master
RuoYi 4 years ago
parent c9f25cb34e
commit 3807b11290
  1. 4
      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()) for (SysRole sysRole : loginUser.getUser().getRoles())
{ {
String roleKey = sysRole.getRoleKey(); 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; return true;
} }
@ -164,6 +164,6 @@ public class PermissionService
*/ */
private boolean hasPermissions(Set<String> permissions, String permission) private boolean hasPermissions(Set<String> permissions, String permission)
{ {
return permissions.contains(ALL_PERMISSION) || permissions.contains(StringUtils.trim(permission)); return permissions.contains(ALL_PERMISSION) || permissions.equals(StringUtils.trim(permission));
} }
} }

Loading…
Cancel
Save