fixup! fix(files_sharing): Move path filtering to group share resolution

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
This commit is contained in:
Salvatore Martire 2026-02-03 11:40:24 +01:00
parent 45aa491e9a
commit a1e07b4a89

View file

@ -961,15 +961,22 @@ class DefaultShareProvider implements
if ($forChildren) {
$qb->andWhere(
$qb->expr()->orX(
$qb->expr()->like('s.file_target', $qb->createNamedParameter($this->dbConn->escapeLikeParameter($path) . '_%')),
$qb->expr()->like('sc.file_target', $qb->createNamedParameter($this->dbConn->escapeLikeParameter($path) . '_%')),
$qb->expr()->andX(
$qb->expr()->isNull('sc.file_target'),
$qb->expr()->like('s.file_target', $qb->createNamedParameter($this->dbConn->escapeLikeParameter($path) . '_%'),
),
),
)
);
} else {
$qb->andWhere(
$qb->expr()->orX(
$qb->expr()->eq('s.file_target', $qb->createNamedParameter($path)),
$qb->expr()->eq('sc.file_target', $qb->createNamedParameter($path)),
$qb->expr()->andX(
$qb->expr()->isNull('sc.file_target'),
$qb->expr()->eq('s.file_target', $qb->createNamedParameter($path)),
),
)
);
}