X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/fc109f7e1c43736edcf6e1546183416f87565310..refs/pull/3083/head:/app/Http/Controllers/ChapterController.php diff --git a/app/Http/Controllers/ChapterController.php b/app/Http/Controllers/ChapterController.php index 7541ad0db..83b9bb692 100644 --- a/app/Http/Controllers/ChapterController.php +++ b/app/Http/Controllers/ChapterController.php @@ -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'));