fix: check for write permission if POST method
This commit is contained in:
parent
824229ce0a
commit
67a5957056
1 changed files with 1 additions and 2 deletions
|
|
@ -136,8 +136,7 @@ def run_doc_method(method: str, document: dict[str, Any] | str, kwargs=None):
|
|||
doc._original_modified = doc.modified
|
||||
doc.check_if_latest()
|
||||
|
||||
if not doc.has_permission("read"):
|
||||
raise frappe.PermissionError
|
||||
doc.check_permission(PERMISSION_MAP[frappe.request.method])
|
||||
|
||||
method_obj = getattr(doc, method)
|
||||
fn = getattr(method_obj, "__func__", method_obj)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue