Apply User Permissions optional in Script and Query Reports

This commit is contained in:
Anand Doshi
2014-06-03 17:23:21 +05:30
parent 221dec8cac
commit ec8240e890
71 changed files with 181 additions and 111 deletions

View File

@@ -40,5 +40,5 @@ def get_permission_query_conditions():
return "(" + " or ".join(conditions) + ")"
def has_permission(doc):
return frappe.has_permission(doc.doc_type, "read", doc.doc_name)
def has_permission(doc, user):
return frappe.has_permission(doc.doc_type, "read", doc.doc_name, user=user)