mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +00:00
Remove usage of deprecated Role class
This commit is contained in:
@@ -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(),
|
||||
]);
|
||||
}
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user