1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-27 06:01:54 +03:00

Made delete permissions a requirement for move operations

Closes #1200
This commit is contained in:
Dan Brown
2019-01-05 14:39:40 +00:00
parent 2317bf2350
commit a2087fe3ff
5 changed files with 65 additions and 6 deletions

View File

@ -586,6 +586,7 @@ class PageController extends Controller
{
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
$this->checkOwnablePermission('page-update', $page);
$this->checkOwnablePermission('page-delete', $page);
return view('pages/move', [
'book' => $page->book,
'page' => $page
@ -604,6 +605,7 @@ class PageController extends Controller
{
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
$this->checkOwnablePermission('page-update', $page);
$this->checkOwnablePermission('page-delete', $page);
$entitySelection = $request->get('entity_selection', null);
if ($entitySelection === null || $entitySelection === '') {