bug #30886 [Workflow] Fixed Guard Listener usage of RoleHierarchyInterface (lyrixx)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Workflow] Fixed Guard Listener usage of RoleHierarchyInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
EUFOSSA
related to https://github.com/symfony/symfony/pull/30388
Commits
-------
a12b359892
[Workflow] Fixed Guard Listener usage of RoleHierarchyInterface
This commit is contained in:
commit
a7c4767a8e
@ -97,10 +97,10 @@ class GuardListener
|
||||
}
|
||||
|
||||
if (null !== $this->roleHierarchy && method_exists($this->roleHierarchy, 'getReachableRoleNames')) {
|
||||
$roleNames = $this->roleHierarchy->getReachableRoleNames($roles);
|
||||
$roleNames = $this->roleHierarchy->getReachableRoleNames($roleNames);
|
||||
$roles = array_map(function (string $role) { return new Role($role, false); }, $roleNames);
|
||||
} elseif (null !== $this->roleHierarchy) {
|
||||
$roles = $this->roleHierarchy->getReachableRoles($token->getRoles(false));
|
||||
$roles = $this->roleHierarchy->getReachableRoles($roles);
|
||||
$roleNames = array_map(function (Role $role) { return $role->getRole(); }, $roles);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user