Skip to content

[PM 34174]Do not show renewal reminder banners to exempt organizations#7483

Open
cyprain-okeke wants to merge 12 commits intomainfrom
billing/pm-34174/do-not-show-renewal-reminder-banners-to-exempt-organizations
Open

[PM 34174]Do not show renewal reminder banners to exempt organizations#7483
cyprain-okeke wants to merge 12 commits intomainfrom
billing/pm-34174/do-not-show-renewal-reminder-banners-to-exempt-organizations

Conversation

@cyprain-okeke
Copy link
Copy Markdown
Contributor

🎟️ Tracking

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

📔 Objective

Suppress billing renewal reminder banners and subscription status callouts for organizations that are exempt from billing
automation.

Reseller-managed organizations marked as exempt (exemptFromBillingAutomation = true) should not see renewal cycle notifications or
warning callouts related to past due, unpaid, pending cancellation, or canceled subscription statuses.

Changes

  • Added exemptFromBillingAutomation field to the organization model pipeline (ProfileOrganizationResponse → OrganizationData →
    Organization)
  • Gated getResellerRenewalWarning$() in OrganizationWarningsService to return null for exempt organizations, skipping the API call
    entirely
  • Added exempt input to SubscriptionStatusComponent to suppress warning callouts (past_due, unpaid, pending_cancellation, canceled)
    while preserving status and date display
  • Passed userOrg.exemptFromBillingAutomation to the SubscriptionStatusComponent from the cloud subscription template

Screenshots & Testing
Testing

  • Verified exempt organizations do not see reseller renewal banners
  • Verified exempt organizations do not see subscription status callouts
  • Verified non-exempt organizations continue to see all warnings as before
  • Unit tests added for both OrganizationWarningsService and SubscriptionStatusComponent

📸 Screenshots

Screenshot 2026-04-16 at 2 27 19 PM Screenshot 2026-04-16 at 2 26 57 PM Screenshot 2026-04-16 at 2 10 06 PM Screenshot 2026-04-16 at 2 09 41 PM Screenshot 2026-04-16 at 1 57 57 PM Screenshot 2026-04-16 at 1 57 08 PM Screenshot 2026-04-16 at 1 53 55 PM Screenshot 2026-04-16 at 1 46 14 PM

@cyprain-okeke cyprain-okeke requested review from a team as code owners April 16, 2026 14:24
@cyprain-okeke cyprain-okeke requested a review from JaredScar April 16, 2026 14:24
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Logo
Checkmarx One – Scan Summary & Details1e9c3966-f606-4847-a10f-9162689760d6


New Issues (2) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 MEDIUM CSRF src/Api/Vault/Controllers/CiphersController.cs: 1558
detailsMethod at line 1558 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector
2 MEDIUM CSRF src/Api/Vault/Controllers/CiphersController.cs: 1385
detailsMethod at line 1385 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.84%. Comparing base (dd19dd8) to head (2e9beb7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7483   +/-   ##
=======================================
  Coverage   59.83%   59.84%           
=======================================
  Files        2103     2103           
  Lines       92788    92794    +6     
  Branches     8266     8268    +2     
=======================================
+ Hits        55523    55529    +6     
  Misses      35295    35295           
  Partials     1970     1970           

☔ 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.

mkincaid-bw
mkincaid-bw previously approved these changes Apr 16, 2026
JaredScar
JaredScar previously approved these changes Apr 16, 2026
JaredScar
JaredScar previously approved these changes Apr 23, 2026
mkincaid-bw
mkincaid-bw previously approved these changes Apr 23, 2026
@cyprain-okeke cyprain-okeke dismissed stale reviews from mkincaid-bw and JaredScar via 7fd5001 May 7, 2026 16:11
@cyprain-okeke cyprain-okeke requested a review from JaredScar May 7, 2026 16:36
@cyprain-okeke cyprain-okeke requested a review from mkincaid-bw May 7, 2026 16:36
mkincaid-bw
mkincaid-bw previously approved these changes May 7, 2026
Copy link
Copy Markdown
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

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

I understand this has already gone through QA, but I'm curious as to why we didn't just check that column value in the GetOrganizationWarningsQuery? That would have prevented at least 9 file changes and a SQL migration done as part of this PR. Additionally, it would likely prevent the need for the clients PR entirely because the warning would never make it to the organization-warnings.service in the first place.

Copy link
Copy Markdown
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

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

Sorry, meant to put a block on this prior. I would like you to look into the simplicity gain we'd get from just seeing if we can drop the warning at the GetOrganizationWarningsQuery level. If that works and it doesn't surfaces the warning and allows us to drop the clients PR entirely, that's the route we should go to avoid adding unnecessary complexity.

Gate InactiveSubscription and ResellerRenewal warnings inside
GetOrganizationWarningsQuery on Organization.ExemptFromBillingAutomation
instead of plumbing the field through the profile response, view models,
EF queries, and SQL views.
@cyprain-okeke cyprain-okeke requested a review from a team as a code owner May 7, 2026 19:12
@cyprain-okeke cyprain-okeke requested review from sbrown-livefront and removed request for JaredScar May 7, 2026 19:12
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

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

Looks great - thank you for making the change.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants