[PM-32572]Premium to organization upgrade does not set public/private key pair or default collection#7076
Conversation
|
New Issues (2)Checkmarx found the following issues in this Pull Request
|
…rade-does-not-set-public-private-key-pair-or-default-collection
| Assert.NotEqual(Guid.Empty, organizationId); | ||
|
|
||
| await _organizationRepository.Received(1).CreateAsync( | ||
| Arg.Is<Organization>(org => |
There was a problem hiding this comment.
⛏ Should the public and private keys be checked here also?
sbrown-livefront
left a comment
There was a problem hiding this comment.
Looks good! Small non-blocking comment on a test
There was a problem hiding this comment.
⛏️ I'm not sure this test is named correctly since the removal of a lot of the metadata changes nor is it testing anything we haven't tested I believe. Can we remove it?
…rade-does-not-set-public-private-key-pair-or-default-collection
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7076 +/- ##
==========================================
+ Coverage 56.45% 56.47% +0.01%
==========================================
Files 2013 2013
Lines 88098 88131 +33
Branches 7860 7860
==========================================
+ Hits 49739 49771 +32
- Misses 36543 36544 +1
Partials 1816 1816 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…rade-does-not-set-public-private-key-pair-or-default-collection
|






🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-32572
📔 Objective
This PR fixes a bug where upgrading from a Premium individual subscription to an organization plan did not properly initialize the organization's
cryptographic key pair or create a default collection.
Bug Fix
Problem: When users upgraded their Premium subscription to an organization plan (Teams/Families/Enterprise), the resulting organization was
missing:
This left organizations in an incomplete state, potentially blocking users from properly sharing vault items or performing other organization
operations that depend on these keys.
Solution:
Changes
📸 Screenshots