]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/ChapterController.php
Added additional permission checks and tests for book sorts
[bookstack] / app / Http / Controllers / ChapterController.php
index 16f0779cafe7184f4bcd2a58cae72c36fc6cab8f..5cd720f02b97ac360ad0fc65e4e61dcd38500c6a 100644 (file)
@@ -178,6 +178,8 @@ class ChapterController extends Controller
             return redirect($chapter->getUrl());
         }
 
+        // TODO - Check permissions against pages
+
         try {
             $newBook = $this->chapterRepo->move($chapter, $entitySelection);
         } catch (MoveOperationException $exception) {
@@ -204,7 +206,7 @@ class ChapterController extends Controller
         session()->flashInput(['name' => $chapter->name]);
 
         return view('chapters.copy', [
-            'book' => $chapter->book,
+            'book'    => $chapter->book,
             'chapter' => $chapter,
         ]);
     }
@@ -225,6 +227,7 @@ class ChapterController extends Controller
 
         if (is_null($newParentBook)) {
             $this->showErrorNotification(trans('errors.selected_book_not_found'));
+
             return redirect()->back();
         }