Skip to content

[PM-36234] Consolidate into 1 auto confirm organization users command (one that is most performative) - #8297

Open
JaredScar wants to merge 1 commit into
mainfrom
ac/pm-36234-auto-confirm-user-flows-consolidation
Open

[PM-36234] Consolidate into 1 auto confirm organization users command (one that is most performative)#8297
JaredScar wants to merge 1 commit into
mainfrom
ac/pm-36234-auto-confirm-user-flows-consolidation

Conversation

@JaredScar

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-36234

📔 Objective

Consolidates the auto confirm organization users endpoints into 1 command and validator. The more efficient of the two.

@JaredScar
JaredScar requested a review from a team as a code owner August 31, 2026 19:42
@JaredScar JaredScar added the ai-review Request a Claude code review label Aug 31, 2026
@JaredScar
JaredScar requested a review from jrmccannon August 31, 2026 19:42
@JaredScar JaredScar added the t:tech-debt Change Type - Tech debt label Aug 31, 2026
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR removes the single-user AutomaticallyConfirmOrganizationUserCommand/validator pair and routes the POST {orgId}/users/{id}/auto-confirm endpoint through the existing bulk command with a one-entry batch. I verified no remaining references to the deleted types, that DI registrations were removed cleanly, and that the deleted tests only covered the removed classes — the bulk command and validator retain their own unit tests plus the existing OrganizationUserControllerAutoConfirmTests integration coverage of this endpoint. I traced the validation, idempotency, event-logging, default-collection, and auto-confirm policy-enforcement paths and found parity with the removed single-user implementation, and confirmed .Single() on the result is safe because the bulk validator always returns exactly one result per requested entry. The dropped userId null check and PerformedBy field were unused for authorization decisions; [Authorize<ManageUsersRequirement>] and [BindOrganization] (which throws NotFoundException for a missing org) preserve the prior 403/404 behavior.

Code Review Details

No findings.

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.64%. Comparing base (17a1912) to head (be1d5fb).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8297      +/-   ##
==========================================
- Coverage   63.67%   63.64%   -0.03%     
==========================================
  Files        2467     2468       +1     
  Lines      105693   105604      -89     
  Branches     9551     9547       -4     
==========================================
- Hits        67295    67207      -88     
- Misses      36082    36087       +5     
+ Partials     2316     2310       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review t:tech-debt Change Type - Tech debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant