summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingtong Li <runassudo@yingtongli.me>2020-06-08 01:11:10 +1000
committerYingtong Li <runassudo@yingtongli.me>2020-06-08 01:11:10 +1000
commite28a814edf0da208c97411dc4f93e20dea717861 (patch)
treeb7a648e625a32ac59702e2164a22d48dbf526aba
parenta1aa2423adfc39e738063d9151ced02ca92492ab (diff)
Ditto for reimbursement claims
-rw-r--r--sstreasury/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sstreasury/models.py b/sstreasury/models.py
index b6b5dbe..87c82e5 100644
--- a/sstreasury/models.py
+++ b/sstreasury/models.py
@@ -285,8 +285,11 @@ class ReimbursementClaim(models.Model):
return False
def can_withdraw(self, user):
- if not self.can_edit(user):
+ if not self.can_view(user):
return False
+ if user != self.author and not user.groups.filter(name='Treasury').exists():
+ return False
+
if self.state == ClaimState.AWAIT_REVIEW.value or self.state == ClaimState.APPROVED.value:
return True
return False
Contact (issues, pull requests, etc.) at git@yingtongli.me. Generated by cgit.