mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
fix(issue): check permission before issue status modification (#55458)
This commit is contained in:
@@ -218,11 +218,13 @@ def get_issue_list(doctype, txt, filters, limit_start, limit_page_length=20, ord
|
|||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def set_multiple_status(names: str, status: str):
|
def set_multiple_status(names: str, status: str):
|
||||||
for name in json.loads(names):
|
for name in json.loads(names):
|
||||||
frappe.db.set_value("Issue", name, "status", status)
|
set_status(name, status)
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def set_status(name: str, status: str):
|
def set_status(name: str, status: str):
|
||||||
|
frappe.has_permission("Issue", "write", name, throw=True)
|
||||||
|
|
||||||
frappe.db.set_value("Issue", name, "status", status)
|
frappe.db.set_value("Issue", name, "status", status)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user