W022: Revoke invitation
Marks a pending invitation as revoked so the accept link stops working. Triggered from Settings, Users, pending invitations row.
Steps
-
Load the invitation. Call
Platform.getInvitationById. Confirm it is pending. -
Mark it revoked. Call
Platform.revokeInvitation(id). The L2 op setsrevoked_at = NOW()if and only if the row is still pending; returns whether a row was updated.
Returns
The revoked invitation.
Business rules
- No undo. A revoked invitation cannot be restored; the admin must send a new one (W008).
Errors
NotFoundError. The invitation does not exist in this org.InvalidTransitionError. The invitation is accepted, declined, or already revoked.