1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Done a refactor pass on PermissionService

Could do with splitting out into seperate query/build classess really.
Closes #2633.
This commit is contained in:
Dan Brown
2021-03-14 19:52:07 +00:00
parent a644f64c6b
commit 1e5951a75f
6 changed files with 147 additions and 247 deletions

View File

@ -82,7 +82,7 @@ class ImageRepo
}
// Filter by page access
$imageQuery = $this->restrictionService->filterRelatedEntity('page', $imageQuery, 'images', 'uploaded_to');
$imageQuery = $this->restrictionService->filterRelatedEntity(Page::class, $imageQuery, 'images', 'uploaded_to');
if ($whereClause !== null) {
$imageQuery = $imageQuery->where($whereClause);