]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/ChapterController.php
Fixed failing test after drawio default url change
[bookstack] / app / Http / Controllers / ChapterController.php
index 7541ad0dbd9811d76d17b7036fd631de07c1916f..83b9bb692da6c3173305c538ab79a6a8a836da86 100644 (file)
@@ -11,6 +11,7 @@ use BookStack\Entities\Tools\NextPreviousContentLocator;
 use BookStack\Entities\Tools\PermissionsUpdater;
 use BookStack\Exceptions\MoveOperationException;
 use BookStack\Exceptions\NotFoundException;
+use BookStack\Exceptions\PermissionsException;
 use Illuminate\Http\Request;
 use Illuminate\Validation\ValidationException;
 use Throwable;
@@ -180,6 +181,8 @@ class ChapterController extends Controller
 
         try {
             $newBook = $this->chapterRepo->move($chapter, $entitySelection);
+        } catch (PermissionsException $exception) {
+            $this->showPermissionError();
         } catch (MoveOperationException $exception) {
             $this->showErrorNotification(trans('errors.selected_book_not_found'));