Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AC-2744] Add provider portal pricing for consolidated billing #4210

Merged
merged 9 commits into from
Jun 24, 2024

Conversation

amorask-bitwarden
Copy link
Contributor

@amorask-bitwarden amorask-bitwarden commented Jun 20, 2024

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/AC-2744

๐Ÿ“” Objective

This PR adds new provider portal pricing for the Teams (Monthly) and Enterprise (Monthly) plan. Because so much of the existing feature's functionality is driven off of matching plan types, I opted for expanding the PasswordManagerPlanFeatures object to include StripeProviderPortalSeatPlanId and ProviderPortalSeatPrice properties. Then, in any Consolidated Billing scenario where were have to create or update subscriptions or show prices, I used these values instead of the original StripeSeatPlanId and SeatPrice properties. This significantly decreased the blast radius of the changes both on server and client.

Companion PR: bitwarden/clients#9753

๐Ÿ“ธ Screenshots

โฐ 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

Copy link
Contributor

github-actions bot commented Jun 20, 2024

Logo
Checkmarx One โ€“ Scan Summary & Details โ€“ f586919e-2d3b-4399-926f-40ffde759924

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Privacy_Violation /src/Api/Vault/Controllers/CiphersController.cs: 961 Attack Vector
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 953 Attack Vector
LOW Open_Redirect /src/Admin/Controllers/ToolsController.cs: 194 Attack Vector

Fixed Issues

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/MembersController.cs: 83
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 583
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 125
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 984
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 111
MEDIUM CSRF /src/Api/SecretsManager/Controllers/SecretsController.cs: 214
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 730
MEDIUM Privacy_Violation /src/Api/Vault/Models/Request/CipherRequestModel.cs: 198
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 628
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 607
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 159
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 657
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 583
LOW Log_Forging /src/Api/Vault/Controllers/CiphersController.cs: 174

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.

Project coverage is 41.02%. Comparing base (4a06c82) to head (b0f49d8).

Files Patch % Lines
src/Api/Models/Response/PlanResponseModel.cs 0.00% 4 Missing โš ๏ธ
...Core/Models/Business/ProviderSubscriptionUpdate.cs 0.00% 2 Missing โš ๏ธ
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4210   +/-   ##
=======================================
  Coverage   41.02%   41.02%           
=======================================
  Files        1245     1245           
  Lines       59888    59899   +11     
  Branches     5484     5484           
=======================================
+ Hits        24567    24573    +6     
- Misses      34187    34192    +5     
  Partials     1134     1134           

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

@amorask-bitwarden amorask-bitwarden merged commit 95f54b6 into main Jun 24, 2024
49 checks passed
@amorask-bitwarden amorask-bitwarden deleted the billing/AC-2744/enterprise-teams-plan-msps branch June 24, 2024 15:16
withinfocus pushed a commit that referenced this pull request Jul 9, 2024
* Expanded Teams and Enterprise plan with provider seat data

* Updated provider setup process with new plan information

* Updated provider subscription retrieval and update with new plan information

* Updated client invoice report with new plan information

* Fixed tests

* Fix broken test
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.

None yet

2 participants