mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
user scope filter: change query (TO CHECK)
This commit is contained in:
parent
70f118011b
commit
ff8a32a321
@ -56,13 +56,10 @@ class UserScopeFilter implements FilterInterface
|
|||||||
|
|
||||||
public function alterQuery(QueryBuilder $qb, $data)
|
public function alterQuery(QueryBuilder $qb, $data)
|
||||||
{
|
{
|
||||||
$qb
|
$qb->join('acp.scopes', 's');
|
||||||
->join('acp.user', 'u')
|
|
||||||
->join('u.mainScope', 's')
|
|
||||||
;
|
|
||||||
|
|
||||||
$where = $qb->getDQLPart('where');
|
$where = $qb->getDQLPart('where');
|
||||||
$clause = $qb->expr()->in('u.mainScope', ':userscope');
|
$clause = $qb->expr()->in('s.id', ':userscope');
|
||||||
|
|
||||||
if ($where instanceof Andx) {
|
if ($where instanceof Andx) {
|
||||||
$where->add($clause);
|
$where->add($clause);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user