Ditto for reimbursement claims
This commit is contained in:
parent
a1aa2423ad
commit
e28a814edf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user