fix resid taeid accsess
This commit is contained in:
1 parent
b53a3e0c5c
commit
4f7486152c
4 files changed
+115
-10
No files matched your search
@@ -79,8 +79,8 @@ def visible(queryset, user):
|
||||
|
||||
|
||||
def can_decide(user, receipt, cycle, senior=False):
|
||||
code = 'senior_approve_paymentreceipt' if senior else 'approve_paymentreceipt'
|
||||
# Selection in the approval policy grants the role for this cycle. Requiring
|
||||
# an additional Django permission made selected non-admin staff unable to vote.
|
||||
return (is_staff(user) and receipt.submitted_by_id != user.pk and
|
||||
has_permission(user, code, receipt.owning_unit) and
|
||||
visible(type(receipt).objects.filter(pk=receipt.pk), user).exists() and
|
||||
cycle.assignments.filter(user=user, is_senior=senior).exists())
|
||||
Reference in new issue
Block a user