Skip to content

Commit

Permalink
[Workflow] Fixed Guard Listener usage of RoleHierarchyInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Apr 6, 2019
1 parent 9ab706b commit a12b359
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 a12b359

Please sign in to comment.