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;
try {
$newBook = $this->chapterRepo->move($chapter, $entitySelection);
+ } catch (PermissionsException $exception) {
+ $this->showPermissionError();
} catch (MoveOperationException $exception) {
$this->showErrorNotification(trans('errors.selected_book_not_found'));
session()->flashInput(['name' => $chapter->name]);
return view('chapters.copy', [
- 'book' => $chapter->book,
+ 'book' => $chapter->book,
'chapter' => $chapter,
]);
}
if (is_null($newParentBook)) {
$this->showErrorNotification(trans('errors.selected_book_not_found'));
+
return redirect()->back();
}