mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[AC-1578] Fixed issue where legacy plans couldn't sign up for SM (#3400)
* Fixed issue where legacy plans couldn't sign up for SM * Removed unit test that check to make sure enterprise 2019 couldn't be upgraded to SM
This commit is contained in:
@ -1811,9 +1811,9 @@ public class OrganizationService : IOrganizationService
|
||||
|
||||
private static void ValidatePlan(Models.StaticStore.Plan plan, int additionalSeats, string productType)
|
||||
{
|
||||
if (plan is not { LegacyYear: null })
|
||||
if (plan is null)
|
||||
{
|
||||
throw new BadRequestException($"Invalid {productType} plan selected.");
|
||||
throw new BadRequestException($"{productType} Plan was null.");
|
||||
}
|
||||
|
||||
if (plan.Disabled)
|
||||
@ -1829,6 +1829,11 @@ public class OrganizationService : IOrganizationService
|
||||
|
||||
public void ValidatePasswordManagerPlan(Models.StaticStore.Plan plan, OrganizationUpgrade upgrade)
|
||||
{
|
||||
if (plan is not { LegacyYear: null })
|
||||
{
|
||||
throw new BadRequestException("Invalid Password Manager plan selected.");
|
||||
}
|
||||
|
||||
ValidatePlan(plan, upgrade.AdditionalSeats, "Password Manager");
|
||||
|
||||
if (plan.PasswordManager.BaseSeats + upgrade.AdditionalSeats <= 0)
|
||||
|
Reference in New Issue
Block a user