Skip to content

Commit

Permalink
bug #30886 [Workflow] Fixed Guard Listener usage of RoleHierarchyInte…
Browse files Browse the repository at this point in the history
…rface (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 #30388

Commits
-------

a12b359 [Workflow] Fixed Guard Listener usage of RoleHierarchyInterface
  • Loading branch information
fabpot committed Apr 6, 2019
2 parents 9793522 + a12b359 commit a7c4767
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -97,10 +97,10 @@ private function getVariables(GuardEvent $event): array
}

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);
}

Expand Down

0 comments on commit a7c4767

Please sign in to comment.