Repository navigation
feat: cancel expired invitations through the API and the CLI - #3246
Conversation
DELETE /invitations/{invitation_id} now removes any invitation that
wasn't accepted, expired ones included, so an administrator can drop an
expired invitation and its metadata without making a new link. Cancel
reuses DeleteUnacceptedInvitation, the statement replace already uses,
and DeleteCancellableInvitation is gone.
`zitadel invitation cancel` accepts and offers expired invitations, and
sends no invitation_cancelled for one, as for a declined invitation.
ADR 086 gets an amendment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 2aa55eb The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thermo-nuclear code quality reviewVerdict: APPROVE Structurally this is the right change. The dramatic code-judo move was taken: cancel collapses onto What already looks good
Findings (inline below)
No file-size crossings, no spaghetti growth on the server path, no missed dramatic simplification. No structural rework required — ADR clarity + optional CLI DRY. Full canvas: https://cursor.com/canvas/store-0f6ecd11-edf3-4341-b0b8-e199f87ca11d/49daf42e-ad29-482a-b1dc-ee6334f0bf73 |
adlerhurst
left a comment
There was a problem hiding this comment.
looks good to me. Cursor found some inconsistencies.
`invitation list`'s default and the cancel picker read one UNACCEPTED_INVITATION_STATUSES, and cancel's hints point at the plain list, which shows exactly those. The picker's hint switches on the status. ADR 086's amendment names the product event and the audit event apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adlerhurst , thanks. I will address the Cursor findings and merge the PR. |
Context
Summary
DELETE /invitations/{invitation_id}removes any invitation that wasn't accepted: pending, expired or rejected. Before, an expired one answered404and kept its row and metadata until a cleanup job that doesn't exist yet, so the only way to remove it was to replace it with a new link.DeleteUnacceptedInvitation, the statement replace already uses, andDeleteCancellableInvitationis removed from all three dialects. An accepted invitation still answers404.zitadel invitation cancelaccepts expired invitations, offers them in its picker, and sends noinvitation_cancelledfor one, as for a declined invitation: an expired journey already counts as not accepted.Notes
invitations-list-filters,cli-invitation-commands) rather than adding new ones.🤖 Generated with Claude Code