Skip to content

Commit 9c0c393

Browse files
authored
fix: add validation in bom creator function (#53364)
1 parent b1ff4da commit 9c0c393

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

erpnext/manufacturing/doctype/bom_creator/bom_creator.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,9 @@ def delete_node(**kwargs):
561561

562562
@frappe.whitelist()
563563
def edit_bom_creator(doctype: str, docname: str, data: str | dict, parent: str):
564+
if not frappe.has_permission(doctype=doctype, ptype="write", parent_doctype="BOM Creator"):
565+
frappe.throw(_("You do not have permission to edit this document"), frappe.PermissionError)
566+
564567
if isinstance(data, str):
565568
data = frappe.parse_json(data)
566569

0 commit comments

Comments
 (0)