]> BookStack Code Mirror - bookstack/blobdiff - app/Uploads/ImageRepo.php
Guest create page: name field autofocus
[bookstack] / app / Uploads / ImageRepo.php
index 13d3344dd580bc7c5450057837ceadbd57b5ef09..8770402adbdb0abe465a9fb866bedb932bf3cf32 100644 (file)
@@ -74,7 +74,7 @@ class ImageRepo
         }
 
         // Filter by page access
-        $imageQuery = $this->permissions->filterRelatedEntity(Page::class, $imageQuery, 'images', 'uploaded_to');
+        $imageQuery = $this->permissions->restrictPageRelationQuery($imageQuery, 'images', 'uploaded_to');
 
         if ($whereClause !== null) {
             $imageQuery = $imageQuery->where($whereClause);