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

@@ -216,7 +216,7 @@ class ReportController extends AbstractController
$reachableScopes = $this->authorizationHelper
->getReachableScopes(
$this->getUser(),
new Role('CHILL_REPORT_SEE'),
'CHILL_REPORT_SEE',
$person->getCenter()
);
@@ -529,7 +529,7 @@ class ReportController extends AbstractController
),
'method' => 'POST',
'cFGroup' => $cFGroup,
'role' => new Role('CHILL_REPORT_CREATE'),
'role' => 'CHILL_REPORT_CREATE',
'center' => $person->getCenter(),
]);
}
@@ -551,7 +551,7 @@ class ReportController extends AbstractController
),
'method' => 'PUT',
'cFGroup' => $entity->getCFGroup(),
'role' => new Role('CHILL_REPORT_UPDATE'),
'role' => 'CHILL_REPORT_UPDATE',
'center' => $entity->getPerson()->getCenter(),
]);
}

View File

@@ -73,7 +73,7 @@ class ReportSearch extends AbstractSearch implements ContainerAwareInterface
//adding join
$qb->join('r.person', 'p');
$role = new Role('CHILL_REPORT_SEE');
$role = 'CHILL_REPORT_SEE';
$reachableCenters = $this->helper->getReachableCenters($this->user, $role);
$whereElement = $qb->expr()->orX();