Ditto for reimbursement claims
This commit is contained in:
parent
a1aa2423ad
commit
e28a814edf
@ -285,8 +285,11 @@ class ReimbursementClaim(models.Model):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def can_withdraw(self, user):
|
def can_withdraw(self, user):
|
||||||
if not self.can_edit(user):
|
if not self.can_view(user):
|
||||||
return False
|
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:
|
if self.state == ClaimState.AWAIT_REVIEW.value or self.state == ClaimState.APPROVED.value:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user