[PM-34389] Add refresh endpoint for organization invite links#7588
[PM-34389] Add refresh endpoint for organization invite links#7588
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the new Code Review DetailsNo findings. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7588 +/- ##
==========================================
+ Coverage 59.76% 64.17% +4.40%
==========================================
Files 2103 2106 +3
Lines 92738 92832 +94
Branches 8262 8266 +4
==========================================
+ Hits 55426 59573 +4147
+ Misses 35354 31208 -4146
- Partials 1958 2051 +93 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… invite link refresh requests
…izationInviteLinkCommand interface for invite link refresh functionality
…ocumentation for clarity and conciseness
…ing encrypted invite keys in invite link requests.
…ks error handling.
…service collection
… validate invite link refresh functionality, including scenarios for valid input, missing links, and insufficient permissions.
…oller to handle invite link refresh requests
…InviteLinksController, validating link replacement and domain consistency.
…ository for atomic link replacement, ensuring transactional integrity during updates.
…ionInviteLinkRepository, verifying link replacement and rollback behavior on unique constraint violations.
…shAsync method for atomic link updates, simplifying invite link management.
54b3dd8 to
3f65375
Compare
|
|
Reviewing this will be my top priority today. |
|
|
||
| private async Task<bool> OrganizationHasInviteLinksAbilityAsync(Guid organizationId) | ||
| { | ||
| var ability = await applicationCacheService.GetOrganizationAbilityAsync(organizationId); |
There was a problem hiding this comment.
Just a comment: I think it's safe to use the ability cache since we should be turning on the new ability cache pattern by the time this change goes out. However, in the event that we fall back to the old cache, just know that there will be a 10-minute lag. This probably isn't a big issue, but it can be frustrating during demos.



🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-34389
📔 Objective
Adds
POST /organizations/{orgId}/invite-link/refreshthat replaces an existing invite link with a new one (new ID, code, and encryption key) while preserving the allowed domains.Clients PR.