+
+ $this->showSuccessNotification(trans('entities.chapter_move_success', ['bookName' => $newBook->name]));
+
+ return redirect($chapter->getUrl());
+ }
+
+ /**
+ * Show the Restrictions view.
+ *
+ * @throws NotFoundException
+ */
+ public function showPermissions(string $bookSlug, string $chapterSlug)
+ {
+ $chapter = $this->chapterRepo->getBySlug($bookSlug, $chapterSlug);
+ $this->checkOwnablePermission('restrictions-manage', $chapter);
+
+ return view('chapters.permissions', [
+ 'chapter' => $chapter,
+ ]);
+ }
+
+ /**
+ * Set the restrictions for this chapter.
+ *
+ * @throws NotFoundException
+ */
+ public function permissions(Request $request, PermissionsUpdater $permissionsUpdater, string $bookSlug, string $chapterSlug)
+ {
+ $chapter = $this->chapterRepo->getBySlug($bookSlug, $chapterSlug);
+ $this->checkOwnablePermission('restrictions-manage', $chapter);
+
+ $permissionsUpdater->updateFromPermissionsForm($chapter, $request);
+
+ $this->showSuccessNotification(trans('entities.chapters_permissions_success'));
+
+ return redirect($chapter->getUrl());