Added destination permission checking to entity move

This commit is contained in:
Dan Brown
2018-04-14 18:47:13 +01:00
parent 0f7b0ad45a
commit cdb1c7ef88
9 changed files with 193 additions and 211 deletions

View File

@ -585,6 +585,8 @@ class PageController extends Controller
return redirect()->back();
}
$this->checkOwnablePermission('page-create', $parent);
$this->entityRepo->changePageParent($page, $parent);
Activity::add($page, 'page_move', $page->book->id);
session()->flash('success', trans('entities.pages_move_success', ['parentName' => $parent->name]));