server icon indicating copy to clipboard operation
server copied to clipboard

[SM-1570] Adding new item to organization license to disable SM ads for users

Open cd-bitwarden opened this issue 2 months ago â€ĸ 3 comments

đŸŽŸī¸ Tracking

https://bitwarden.atlassian.net/browse/SM-1740 https://bitwarden.atlassian.net/browse/SM-1742

📔 Objective

Adding the new column to the database for adding a new item to the organization table for "disabling SM ads for users", this new item is called UseDisableSMAdsForUsers.

  • SQL updates to the Organization table
  • Migration Scripts
  • Entity Framework Changes
  • Followed advice from Connor Turnbull and these documents : https://bitwarden.atlassian.net/wiki/spaces/EN/pages/2014642217/Adding+a+new+plan+feature, https://bitwarden.atlassian.net/wiki/spaces/EN/pages/2070446163/Technical+Breakdown+Disable+SM+Ads+for+Users

📸 Screenshots

N/A

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

đŸĻŽ Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or â„šī¸ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or âš ī¸ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or â™ģī¸ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

cd-bitwarden avatar Oct 22 '25 16:10 cd-bitwarden

Logo Checkmarx One – Scan Summary & Details – 358ff6c0-ef67-4917-aefa-cceff69af618

Great job! No new security vulnerabilities introduced in this pull request

github-actions[bot] avatar Oct 22 '25 16:10 github-actions[bot]

Codecov Report

:x: Patch coverage is 71.42857% with 8 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 58.55%. Comparing base (e6c97bd) to head (2c1701d).

Files with missing lines Patch % Lines
...illing/Organizations/Models/OrganizationLicense.cs 40.00% 3 Missing :warning:
...Admin/AdminConsole/Models/OrganizationEditModel.cs 33.33% 2 Missing :warning:
...Admin/AdminConsole/Models/OrganizationViewModel.cs 0.00% 1 Missing :warning:
.../Core/AdminConsole/Services/OrganizationFactory.cs 66.66% 1 Missing :warning:
...mplementations/OrganizationLicenseClaimsFactory.cs 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6482      +/-   ##
==========================================
+ Coverage   54.71%   58.55%   +3.84%     
==========================================
  Files        1925     1925              
  Lines       85671    85698      +27     
  Branches     7670     7670              
==========================================
+ Hits        46876    50182    +3306     
+ Misses      37011    33657    -3354     
- Partials     1784     1859      +75     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Oct 22 '25 22:10 codecov[bot]

Claude finished @cd-bitwarden's task in 2m 51s —— View job


Code Review Complete

  • [x] Starting code review
  • [x] Analyzing changes
  • [x] Posting review comments

The bitwarden-code-reviewer agent has completed its review and posted inline comments directly on the PR.

claude[bot] avatar Oct 28 '25 18:10 claude[bot]

Overall Assessment: REQUEST CHANGES

Critical Issues:

  • src/Core/AdminConsole/Services/OrganizationFactory.cs:119 - Missing UseDisableSmAdsForUsers in obsolete license path
  • util/Migrator/DbScripts/2025-12-18_00_AddDisableSMAdsForUsersToOrganization.sql:1 - Future-dated migration script filename

See inline comments for details.

claude[bot] avatar Dec 18 '25 22:12 claude[bot]