diff --git a/plugins/blog/api/v1/blog.php b/plugins/blog/api/v1/blog.php index 8ce1587373..07e64328a2 100644 --- a/plugins/blog/api/v1/blog.php +++ b/plugins/blog/api/v1/blog.php @@ -175,6 +175,13 @@ public function post($pages) //$blog->setMature($_POST['mature']); } + if (!$blog->canEdit()) { + return Factory::response([ + 'status' => 'error', + 'message' => 'Sorry, you do not have permission' + ]); + } + $blog->save(); if (is_uploaded_file($_FILES['file']['tmp_name'])) {