fix: Add authorization checks on internal functions (#55709)

This commit is contained in:
Ankush Menat
2026-06-08 14:49:32 +05:30
committed by GitHub
parent 5eb9461cfd
commit ba936eefab
16 changed files with 20 additions and 38 deletions

View File

@@ -754,7 +754,7 @@ def set_project_status(project: str, status: str):
frappe.throw(_("Status must be Cancelled or Completed"))
project = frappe.get_doc("Project", project)
frappe.has_permission(doc=project, throw=True)
project.check_permission("write")
for task in frappe.get_all("Task", dict(project=project.name)):
frappe.db.set_value("Task", task.name, "status", status)