]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/HierarchyTransformer.php
Guest create page: name field autofocus
[bookstack] / app / Entities / Tools / HierarchyTransformer.php
index 50d9e2eaeef3db682deba89112dea6dca167e36e..43cf2390e7a5de683399674bc040323866eafa66 100644 (file)
@@ -65,7 +65,7 @@ class HierarchyTransformer
         foreach ($book->chapters as $index => $chapter) {
             $newBook = $this->transformChapterToBook($chapter);
             $shelfBookSyncData[$newBook->id] = ['order' => $index];
-            if (!$newBook->restricted) {
+            if (!$newBook->hasPermissions()) {
                 $this->cloner->copyEntityPermissions($shelf, $newBook);
             }
         }