Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
smthing committed Aug 20, 2024
1 parent e14f47a commit 802f3bd
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,13 @@ public boolean isUserInRole(String role, LoginAccount loginAccount, HttpServletR
return true;
}
}
String roleLink = httpServletRequest.getServletInfo().getSecurityRoles().get(role);
if (roleLink == null) {
return loginAccount.getRoles().contains(role);
}
System.out.println(roleLink);
System.out.println(httpServletRequest.getServletInfo().getSecurityRoles());
return loginAccount.getMatches().contains(role);
return loginAccount.getRoles().contains(roleLink) || loginAccount.getRoles().contains(role);
}

@Override
Expand Down

0 comments on commit 802f3bd

Please sign in to comment.