mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +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)
|
||||
{
|
||||
$qb
|
||||
->join('acp.user', 'u')
|
||||
->join('u.mainScope', 's')
|
||||
;
|
||||
$qb->join('acp.scopes', 's');
|
||||
|
||||
$where = $qb->getDQLPart('where');
|
||||
$clause = $qb->expr()->in('u.mainScope', ':userscope');
|
||||
$clause = $qb->expr()->in('s.id', ':userscope');
|
||||
|
||||
if ($where instanceof Andx) {
|
||||
$where->add($clause);
|
||||
|
Loading…
x
Reference in New Issue
Block a user