mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-01 22:39:13 +08:00
Initial updates to allow for page copy when the user can read the page but can't update it.
This commit is contained in:
@ -641,7 +641,7 @@ class PageController extends Controller
|
||||
public function showCopy($bookSlug, $pageSlug)
|
||||
{
|
||||
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
|
||||
$this->checkOwnablePermission('page-update', $page);
|
||||
$this->checkOwnablePermission('page-view', $page);
|
||||
session()->flashInput(['name' => $page->name]);
|
||||
return view('pages/copy', [
|
||||
'book' => $page->book,
|
||||
@ -660,7 +660,7 @@ class PageController extends Controller
|
||||
public function copy($bookSlug, $pageSlug, Request $request)
|
||||
{
|
||||
$page = $this->pageRepo->getPageBySlug($pageSlug, $bookSlug);
|
||||
$this->checkOwnablePermission('page-update', $page);
|
||||
$this->checkOwnablePermission('page-view', $page);
|
||||
|
||||
$entitySelection = $request->get('entity_selection', null);
|
||||
if ($entitySelection === null || $entitySelection === '') {
|
||||
|
Reference in New Issue
Block a user