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

Build out core attachments API controller

Related to #2942
This commit is contained in:
Dan Brown
2021-10-18 17:46:55 +01:00
parent 1a8a6c609a
commit 32f6ea946f
5 changed files with 196 additions and 17 deletions

View File

@ -121,9 +121,9 @@ class AttachmentController extends Controller
]), 422);
}
$this->checkOwnablePermission('view', $attachment->page);
$this->checkOwnablePermission('page-view', $attachment->page);
$this->checkOwnablePermission('page-update', $attachment->page);
$this->checkOwnablePermission('attachment-create', $attachment);
$this->checkOwnablePermission('attachment-update', $attachment);
$attachment = $this->attachmentService->updateFile($attachment, [
'name' => $request->get('attachment_edit_name'),