mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-16 00:57:38 +00:00
cs: Enable more risky rules.
This commit is contained in:
@@ -13,6 +13,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Security\Core\Role\RoleHierarchyInterface;
|
||||
use function array_keys;
|
||||
use function in_array;
|
||||
|
||||
/**
|
||||
* Helper which traverse all role to find parents.
|
||||
@@ -54,7 +55,7 @@ class ParentRoleHelper
|
||||
foreach ($roles as $r) {
|
||||
$childRoles = $this->roleHierarchy->getReachableRoleNames([$r]);
|
||||
|
||||
if (\in_array($role, $childRoles)) {
|
||||
if (in_array($role, $childRoles)) {
|
||||
$parentRoles[] = $r;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user