]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/SearchRunner.php
Fixed failed permission checks due to non-loaded fields
[bookstack] / app / Entities / Tools / SearchRunner.php
index 78659b7864565d6d1f6edfeb0e843aecb0ba0678..22f0f66c7d43217a2c7f2811cb9ba3b210264e01 100644 (file)
@@ -163,7 +163,7 @@ class SearchRunner
         $entityQuery = $entityModelInstance->newQuery()->scopes('visible');
 
         if ($entityModelInstance instanceof Page) {
-            $entityQuery->select($entityModelInstance::$listAttributes);
+            $entityQuery->select(array_merge($entityModelInstance::$listAttributes, ['restricted', 'owned_by']));
         } else {
             $entityQuery->select(['*']);
         }