[PM-38749] Add endpoint to update SupportsConfirmation and inviteBlob#7999
[PM-38749] Add endpoint to update SupportsConfirmation and inviteBlob#7999JimmyVo16 wants to merge 2 commits into
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the new Code Review Details
|
| TypedResults.Ok(new OrganizationInviteLinkResponseModel(link))); | ||
| } | ||
|
|
||
| [HttpPut("support-confirm")] |
There was a problem hiding this comment.
I don't feel strongly about this route name. We have an endpoint with the base route that only updates the domain name, so we need to name this one something different. I'm happy to hear any suggestions.
| } | ||
|
|
||
| var inviteLink = await organizationInviteLinkRepository.GetByOrganizationIdAsync(request.OrganizationId); | ||
| if (inviteLink is null) | ||
| { | ||
| return new InviteLinkNotFound(); | ||
| } | ||
|
|
||
| inviteLink.Invite = request.Invite; | ||
| inviteLink.SupportsConfirmation = request.SupportsConfirmation; | ||
| inviteLink.RevisionDate = timeProvider.GetUtcNow().UtcDateTime; | ||
|
|
||
| await organizationInviteLinkRepository.ReplaceAsync(inviteLink); | ||
|
|
||
| return inviteLink; | ||
| } | ||
|
|
||
| private async Task<bool> OrganizationHasInviteLinksAbilityAsync(Guid organizationId) | ||
| { | ||
| var ability = await organizationAbilityCacheService.GetOrganizationAbilityAsync(organizationId); |
There was a problem hiding this comment.
❓ QUESTION: This mutating command does not log an organization audit event, unlike every sibling invite-link command.
Details
CreateOrganizationInviteLinkCommand, UpdateOrganizationInviteLinkCommand (Organization_InviteLinkDomainsEdited), RefreshOrganizationInviteLinkCommand, and DeleteOrganizationInviteLinkCommand all inject IEventService and log an EventType.Organization_InviteLink* event on success. This command changes the Invite blob and SupportsConfirmation flag but records nothing in the audit trail.
Is the missing audit event intentional (e.g., deferred to a follow-up, or intentionally out of scope), or should a new EventType be logged here for consistency with the other mutating operations?
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7999 +/- ##
==========================================
+ Coverage 62.23% 62.24% +0.01%
==========================================
Files 2287 2290 +3
Lines 99663 99705 +42
Branches 9004 9007 +3
==========================================
+ Hits 62023 62064 +41
- Misses 35469 35470 +1
Partials 2171 2171 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-38749
📔 Objective