Worked around create permission quirks

This commit is contained in:
Dan Brown
2016-04-26 21:48:17 +01:00
parent a81a56706e
commit 9a31b83b2a
3 changed files with 45 additions and 19 deletions

View File

@ -69,7 +69,7 @@ class PageController extends Controller
{
$book = $this->bookRepo->getBySlug($bookSlug);
$draft = $this->pageRepo->getById($pageId, true);
$this->checkOwnablePermission('page-create', $draft);
$this->checkOwnablePermission('page-create', $book);
$this->setPageTitle('Edit Page Draft');
return view('pages/create', ['draft' => $draft, 'book' => $book]);