]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageRepo.php
Extend /users API endpoint
[bookstack] / app / Uploads / ImageRepo.php
index 112ac6727e164b795021bbfb61ca987a15c9a31e..e6f7668241dafa4dcfad7a0b852bfc6d214904c8 100644 (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);