Merge pull request #7541 from frappe/fix-has-perm

fix: has permission decorator
This commit is contained in:
Suraj Shetty 2019-05-23 15:11:10 +05:30 committed by GitHub
commit 9883b1f751
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,7 +30,7 @@ def print_has_permission_check_logs(func):
# print only if access denied
# and if user is checking his own permission
if not result and self_perm_check and raise_exception:
msgprint(('<br>').join(frappe.flags.get('has_permission_check_logs')))
msgprint(('<br>').join(frappe.flags.get('has_permission_check_logs', [])))
frappe.flags.pop('has_permission_check_logs', None)
return result
return inner