mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-31 07:28:04 +00:00
Merge pull request #58324 from Shllokkk/crm-note-edit-note-permission-check
fix(crm): check write permission in edit_note
This commit is contained in:
@@ -256,6 +256,9 @@ class CRMNote(Document):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def edit_note(self, note: str, row_id: str):
|
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:
|
for d in self.notes:
|
||||||
if cstr(d.name) == row_id:
|
if cstr(d.name) == row_id:
|
||||||
d.note = note
|
d.note = note
|
||||||
|
|||||||
Reference in New Issue
Block a user