- $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->checkOwnablePermission('chapter-update', $chapter);
+ $this->checkOwnablePermission('chapter-delete', $chapter);
+ $this->checkPermission('book-create-all');