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

@@ -43,7 +43,7 @@ class ConsultationController extends \Symfony\Bundle\FrameworkBundle\Controller\
$circles = $authorizationHelper->getReachableCircles(
$this->getUser(),
new Role(ConsultationVoter::SEE),
ConsultationVoter::SEE,
$person->getCenter()
);

View File

@@ -87,7 +87,7 @@ class ChillPersonAddAPersonWidget implements WidgetInterface
// show only the person from the authorized centers
$and = $qb->expr()->andX();
$centers = $this->authorizationHelper
->getReachableCenters($this->getUser(), new Role(PersonVoter::SEE));
->getReachableCenters($this->getUser(), PersonVoter::SEE);
$and->add($qb->expr()->in('person.center', ':centers'));
$qb->setParameter('centers', $centers);