]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/HierarchyTransformer.php
Tests: Updated comment test to account for new editor usage
[bookstack] / app / Entities / Tools / HierarchyTransformer.php
index 50d9e2eaeef3db682deba89112dea6dca167e36e..cd6c548fe581b1f9179e5332dd3174461ea4dbe1 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace BookStack\Entities\Tools;
 
-use BookStack\Actions\ActivityType;
+use BookStack\Activity\ActivityType;
 use BookStack\Entities\Models\Book;
 use BookStack\Entities\Models\Bookshelf;
 use BookStack\Entities\Models\Chapter;
@@ -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);
             }
         }