Skip to content

Commit

Permalink
fix: require write access for records linked in Address or Contact (L…
Browse files Browse the repository at this point in the history
…AN-858)
  • Loading branch information
barredterra committed Sep 23, 2024
1 parent 82c3eb5 commit 039b974
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions landa/address_and_contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def validate(doc, event):

doc.organization = None
for link in doc.links:
frappe.has_permission("write", link.link_doctype, link.link_name, throw=True)

if link.link_doctype == "Customer":
doc.organization = link.link_name

Expand Down

0 comments on commit 039b974

Please sign in to comment.