user scope filter: change query (TO CHECK)

This commit is contained in:
Mathieu Jaumotte 2022-07-20 11:23:03 +02:00
parent 70f118011b
commit ff8a32a321

View File

@ -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);