mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 09:12:14 +00:00
Remove unnecessary authority comparison.
Issue: gh-7035
This commit is contained in:
parent
0fea2fb256
commit
2d36062846
@ -192,7 +192,7 @@ public class RoleHierarchyImpl implements RoleHierarchy {
|
||||
} else {
|
||||
rolesReachableInOneStepSet = this.rolesReachableInOneStepMap.get(higherRole);
|
||||
}
|
||||
addReachableRoles(rolesReachableInOneStepSet, lowerRole);
|
||||
rolesReachableInOneStepSet.add(lowerRole);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("buildRolesReachableInOneStepMap() - From role " + higherRole
|
||||
+ " one can reach role " + lowerRole + " in one step.");
|
||||
@ -227,7 +227,7 @@ public class RoleHierarchyImpl implements RoleHierarchy {
|
||||
// take a role from the rolesToVisit set
|
||||
GrantedAuthority aRole = rolesToVisitSet.iterator().next();
|
||||
rolesToVisitSet.remove(aRole);
|
||||
addReachableRoles(visitedRolesSet, aRole);
|
||||
visitedRolesSet.add(aRole);
|
||||
if (this.rolesReachableInOneStepMap.containsKey(aRole)) {
|
||||
Set<GrantedAuthority> newReachableRoles = this.rolesReachableInOneStepMap
|
||||
.get(aRole);
|
||||
|
Loading…
x
Reference in New Issue
Block a user