Explorar el Código

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

version-14
Nabin Hait hace 8 años
padre
commit
11237be4f5
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. +4
    -0
      frappe/core/doctype/communication/communication.py

+ 4
- 0
frappe/core/doctype/communication/communication.py Ver fichero

@@ -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


Cargando…
Cancelar
Guardar