fix: improved execution logic for has_permission hook
This commit is contained in:
parent
514455d1b7
commit
e48d979c2b
1 changed files with 1 additions and 1 deletions
|
|
@ -301,7 +301,7 @@ def has_controller_permissions(doc, ptype, user=None):
|
|||
if not methods:
|
||||
return None
|
||||
|
||||
for method in methods:
|
||||
for method in reversed(methods):
|
||||
controller_permission = frappe.call(frappe.get_attr(method), doc=doc, ptype=ptype, user=user)
|
||||
if controller_permission is not None:
|
||||
return controller_permission
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue