8000 [Workflow] Fixed Guard Listener usage of RoleHierarchyInterface by lyrixx · Pull Request #30886 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Workflow] Fixed Guard Listener usage of RoleHierarchyInterface #30886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Workflow] Fixed Guard Listener usage of RoleHierarchyInterface
  • Loading branch information
lyrixx committed Apr 6, 2019
commit a12b35989220a0351fe2566254fb91d5b947b523
Original file line number Diff line number Diff line change
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