Remove usage of deprecated Role class

This commit is contained in:
2023-08-31 17:08:18 +02:00
parent 76142c1264
commit 7c58880139
33 changed files with 55 additions and 80 deletions

View File

@@ -119,7 +119,7 @@ class EventVoter extends AbstractChillVoter implements ProvideRoleHierarchyInter
// subject is null. We check that at least one center is reachable
$centers = $this->authorizationHelper
->getReachableCenters($token->getUser(), new Role($attribute));
->getReachableCenters($token->getUser(), $attribute);
return count($centers) > 0;

View File

@@ -116,7 +116,7 @@ class ParticipationVoter extends AbstractChillVoter implements ProvideRoleHierar
// subject is null. We check that at least one center is reachable
$centers = $this->authorizationHelper
->getReachableCenters($token->getUser(), new Role($attribute));
->getReachableCenters($token->getUser(), $attribute);
return count($centers) > 0;