Fixed note permission query

This commit is contained in:
Anand Doshi 2015-03-31 14:41:58 +05:30
parent aefc01372f
commit 92af795f12

View File

@ -24,10 +24,7 @@ def get_permission_query_conditions(user):
if user == "Administrator":
return ""
return """(`tabNote`.public=1 or `tabNote`.owner="{user}" or exists (
select name from `tabNote User`
where `tabNote User`.parent=`tabNote`.name
and `tabNote User`.user="{user}"))""".format(user=frappe.db.escape(user))
return "`tabNote`.public=1"
def has_permission(doc, ptype, user):
if doc.public == 1 or user == "Administrator":