Browse Source

Recursive issue on checking permission for communication when it is linked to self

version-14
Nabin Hait 8 years ago
parent
commit
11237be4f5
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      frappe/core/doctype/communication/communication.py

+ 4
- 0
frappe/core/doctype/communication/communication.py View File

@@ -264,6 +264,10 @@ def on_doctype_update():

def has_permission(doc, ptype, user):
if ptype=="read":
if (doc.reference_doctype == "Communication" and doc.reference_name == doc.name) \
or (doc.timeline_doctype == "Communication" and doc.timeline_name == doc.name):
return
if doc.reference_doctype and doc.reference_name:
if frappe.has_permission(doc.reference_doctype, ptype="read", doc=doc.reference_name):
return True


Loading…
Cancel
Save