fix(crm): check write permission in edit_note

This commit is contained in:
Shllokkk
2026-08-21 13:18:26 +05:30
parent 0223223385
commit eb49f51d29

View File

@@ -256,6 +256,9 @@ class CRMNote(Document):
@frappe.whitelist()
def edit_note(self, note: str, row_id: str):
# db_update() skips the write check that save() does in add_note/delete_note
self.check_permission("write")
for d in self.notes:
if cstr(d.name) == row_id:
d.note = note