This commit is contained in:
Suraj Shetty 2018-11-12 13:11:15 +05:30
parent e2cce998c5
commit efbfc087d2

View file

@ -516,4 +516,4 @@ def allow_everything():
def get_allowed_docs_for_doctype(user_permissions, doctype):
'''Returns all the docs from the passed user_permission
that are allowed under provide doctype'''
return [d.doc for d in user_permissions if not d.allowed_for or d.allowed_for == doctype]
return [d.doc for d in user_permissions if not d.applicable_for or d.applicable_for == doctype]