From 2b2a0056824864a29ac0c56b36386f787c7e2229 Mon Sep 17 00:00:00 2001 From: Shllokkk Date: Fri, 21 Aug 2026 13:18:26 +0530 Subject: [PATCH 1/2] fix(crm): check write permission in edit_note (cherry picked from commit eb49f51d29330bec3761d69c0ca12a79bce14fb0) # Conflicts: # erpnext/crm/utils.py --- erpnext/crm/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/erpnext/crm/utils.py b/erpnext/crm/utils.py index 06d97b5173f..0323c3bfa0e 100644 --- a/erpnext/crm/utils.py +++ b/erpnext/crm/utils.py @@ -227,7 +227,14 @@ class CRMNote(Document): notify_mentions(self.doctype, self.name, note) @frappe.whitelist() +<<<<<<< HEAD def edit_note(self, note, row_id): +======= + 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") + +>>>>>>> eb49f51 (fix(crm): check write permission in edit_note) for d in self.notes: if cstr(d.name) == row_id: d.note = note From f0ac82605c728f6d3c7f6697fab2572032d814f2 Mon Sep 17 00:00:00 2001 From: Shllokkk <140623894+Shllokkk@users.noreply.github.com> Date: Sat, 29 Aug 2026 13:06:10 +0530 Subject: [PATCH 2/2] chore: resolve merge conflicts --- erpnext/crm/utils.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/erpnext/crm/utils.py b/erpnext/crm/utils.py index 0323c3bfa0e..15569ed61ec 100644 --- a/erpnext/crm/utils.py +++ b/erpnext/crm/utils.py @@ -227,14 +227,10 @@ class CRMNote(Document): notify_mentions(self.doctype, self.name, note) @frappe.whitelist() -<<<<<<< HEAD - def edit_note(self, note, row_id): -======= 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") ->>>>>>> eb49f51 (fix(crm): check write permission in edit_note) for d in self.notes: if cstr(d.name) == row_id: d.note = note