mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fixes on tests
This commit is contained in:
@@ -19,7 +19,6 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Templating\EngineInterface as TemplatingEngine;
|
||||
use function count;
|
||||
|
||||
@@ -145,7 +144,7 @@ class EventSearch extends AbstractSearch
|
||||
{
|
||||
// add security clauses
|
||||
$reachableCenters = $this->helper
|
||||
->getReachableCenters($this->user, new Role('CHILL_EVENT_SEE'));
|
||||
->getReachableCenters($this->user, 'CHILL_EVENT_SEE');
|
||||
|
||||
if (count($reachableCenters) === 0) {
|
||||
// add a clause to block all events
|
||||
@@ -158,7 +157,7 @@ class EventSearch extends AbstractSearch
|
||||
foreach ($reachableCenters as $center) {
|
||||
$circles = $this->helper->getReachableScopes(
|
||||
$this->user,
|
||||
new Role('CHILL_EVENT_SEE'),
|
||||
'CHILL_EVENT_SEE',
|
||||
$center
|
||||
);
|
||||
$where = $qb->expr()->andX(
|
||||
|
Reference in New Issue
Block a user