mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 14:36:13 +00:00
fix bug in listing users in form filtering tasks
This commit is contained in:
parent
e25621ef79
commit
c36778184d
5
CHANGELOG.md
Normal file
5
CHANGELOG.md
Normal file
@ -0,0 +1,5 @@
|
||||
Branch master
|
||||
=============
|
||||
|
||||
- fix bug in filter task form: allow to show the list of users, which was hidden when the user had access to multiple centers;
|
||||
|
@ -237,10 +237,11 @@ class SingleTaskListType extends AbstractType
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
$circleCenterCond = $qb->expr()->orX();
|
||||
foreach ($centers as $center) {
|
||||
$circles = $this->authorizationHelper->getReachableCircles($user, $role, $center);
|
||||
// add condition about person and circle
|
||||
$qb->andWhere(
|
||||
$circleCenterCond->add(
|
||||
$qb->expr()->andX()
|
||||
->add($qb->expr()->eq('person.center', ':center_'.$i))
|
||||
->add($qb->expr()->in('task.circle', ':circles_'.$i))
|
||||
@ -252,6 +253,7 @@ class SingleTaskListType extends AbstractType
|
||||
// increase counter
|
||||
$i++;
|
||||
}
|
||||
$qb->andWhere($circleCenterCond);
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user