Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.6' into bugfix/grid-helper-assets
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Helper/GridHelperService.php
  • Loading branch information
robertSt7 committed Dec 17, 2024
2 parents ac3f184 + 3d0fca2 commit 2662efc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Helper/GridHelperService.php
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ private function optimizedConcatNotLike(
}

return '(
(`path` != "' . $path . '/" AND ' . $queryColumn . ' != "' . $leaf . '")
NOT (`path` = "' . $path . '/" AND ' . $queryColumn . ' = "' . $leaf . '")
AND
`path` NOT LIKE "' . $fullpath . '/%"
)';
Expand Down Expand Up @@ -995,7 +995,9 @@ protected function getPermittedPathsByUser(string $type, User $user): string
//if any allowed child is found, the current folder can be listed but its content is still blocked
$onlyChildren = true;
}
$forbiddenPathSql[] = $this->optimizedConcatNotLike($forbiddenPath, $onlyChildren, $type) . $exceptions;
$forbiddenPathSql[] =
'(' . $this->optimizedConcatNotLike($forbiddenPath, $onlyChildren, $type) . $exceptions . ')'
;
}
foreach ($elementPaths['allowed'] as $allowedPaths) {
$allowedPathSql[] = $this->optimizedConcatLike($allowedPaths, $type);
Expand Down

0 comments on commit 2662efc

Please sign in to comment.