fix(issue): check permission before issue status modification (#55458)

This commit is contained in:
Diptanil Saha
2026-05-31 22:07:28 +05:30
committed by GitHub
parent a7e2daff7e
commit 876f403500

View File

@@ -218,11 +218,13 @@ def get_issue_list(doctype, txt, filters, limit_start, limit_page_length=20, ord
@frappe.whitelist()
def set_multiple_status(names: str, status: str):
for name in json.loads(names):
frappe.db.set_value("Issue", name, "status", status)
set_status(name, status)
@frappe.whitelist()
def set_status(name: str, status: str):
frappe.has_permission("Issue", "write", name, throw=True)
frappe.db.set_value("Issue", name, "status", status)