working implementation of revoke invitation

This commit is contained in:
dandds
2018-11-07 08:59:04 -05:00
parent b9529d5c4e
commit 4849a89125
5 changed files with 23 additions and 8 deletions

View File

@@ -51,7 +51,9 @@ class WorkspaceRole(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
if self.status == Status.ACTIVE:
return "Active"
elif self.latest_invitation:
if self.latest_invitation.is_rejected_expired:
if self.latest_invitation.is_revoked:
return "Revoked"
elif self.latest_invitation.is_rejected_expired:
return "Invite expired"
elif self.latest_invitation.is_rejected_wrong_user:
return "Error on invite"