Skip to content

[PM-36419] [BEEEP] Add collection management settings to seeder#7576

Open
eliykat wants to merge 4 commits intomainfrom
ac/pm-36419/beeep-add-collection-management-settings-to-seeder
Open

[PM-36419] [BEEEP] Add collection management settings to seeder#7576
eliykat wants to merge 4 commits intomainfrom
ac/pm-36419/beeep-add-collection-management-settings-to-seeder

Conversation

@eliykat
Copy link
Copy Markdown
Member

@eliykat eliykat commented May 2, 2026

🎟️ Tracking

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

📔 Objective

Allow control of collection management settings via the seeder. These alter organization/collection behavior significantly and go hand-in-hand with different collection/group assignments to set up a customer's preferred access controls.

I wanted to avoid appending lots of nullable parameters to various methods, so I've created an OrganizationOverrides bucket to contain them. This should allow for easier modification in in the future as well.

📸 Screenshots

@eliykat eliykat requested a review from theMickster May 2, 2026 03:38
Comment on lines -16 to -21
// Org-level admin settings — not plan-gated, safe defaults for seeding
org.UseAutomaticUserConfirmation = true;
org.AllowAdminAccessToAllCollectionItems = true;
org.LimitCollectionCreation = true;
org.LimitCollectionDeletion = true;
org.LimitItemDeletion = true;
Copy link
Copy Markdown
Member Author

@eliykat eliykat May 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opinionated change I wanted to call out: it's correct that these are not plan-gated, however they all default to false in production, so omitting them here is a more sensible default. Particularly as we now have overrides you can apply to turn them on if you want. (I've included UseAutomaticUserConfirmation in the overrides as well for completeness.)

I assume nobody is relying on these default values yet but we can discuss if this is expected to cause impact anywhere.

@eliykat eliykat added the ai-review Request a Claude code review label May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the seeder changes that introduce an OrganizationOverrides bucket for collection management settings (UseAutomaticUserConfirmation, AllowAdminAccessToAllCollectionItems, LimitItemDeletion, LimitCollectionCreation, LimitCollectionDeletion). The change wires overrides consistently through preset JSON, CLI args, OrganizationVaultOptions, the recipe builder, and CreateOrganizationStep. Plan-default seeding for these properties is removed so seeded organizations now match production defaults (false), as the author explicitly called out for discussion. Scope is limited to util/Seeder and util/SeederUtility — dev/test tooling only.

Code Review Details

No findings. The override pattern is internally consistent (schema, model, CLI, options, step), null-coalescing in ApplyOrganizationOverrides cleanly preserves plan defaults when overrides aren't set, and the schema descriptions correctly describe what true means without claiming a default. The behavior change in seed defaults is deliberate, called out in the author's self-review thread, and aligns with production behavior.

Comment thread util/Seeder/Seeds/schemas/preset.schema.json
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 2, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.62%. Comparing base (ea007b6) to head (d962be2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7576      +/-   ##
==========================================
+ Coverage   59.61%   59.62%   +0.01%     
==========================================
  Files        2096     2096              
  Lines       92580    92580              
  Branches     8245     8245              
==========================================
+ Hits        55190    55200      +10     
+ Misses      35437    35427      -10     
  Partials     1953     1953              

☔ View full report in Codecov by Sentry.
📢 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant