Browse Source
* Upgraded old 2019 plans to have the same features as 2020 and beyond * Removed redundant test and moved additional test cases to GetByOrgIdAsync_SmNoneFreePlans_ReturnsNull * Fixed issue where feature flag wasn't returning correct plans * Added teams 2010 plan * Reverted accidental change to StripePaymentService * Split feature flag logic and added some explanatory comments * Removed families changes * Resolved issue where Teams Starter could not sign up for a new org with SM enabled * Fixed issue with signing up for SM with Teams Starter * Resolved issue where an active plan could increase their SM seat count to be greater than the base seats in the password manager plan * Updated unit test to ensure Seats are higher than SmSeats * Resolved issue where getting plans would return a value that LINQ previously cached when feature flag was in a different statepull/3414/head
18 changed files with 171 additions and 8 deletions
@ -0,0 +1,70 @@ |
|||||||
|
using Bit.Core.Enums; |
||||||
|
|
||||||
|
namespace Bit.Core.Models.StaticStore.Plans; |
||||||
|
|
||||||
|
public record TeamsStarterPlan : Plan |
||||||
|
{ |
||||||
|
public TeamsStarterPlan() |
||||||
|
{ |
||||||
|
Type = PlanType.TeamsStarter; |
||||||
|
Product = ProductType.TeamsStarter; |
||||||
|
Name = "Teams (Starter)"; |
||||||
|
NameLocalizationKey = "planNameTeamsStarter"; |
||||||
|
DescriptionLocalizationKey = "planDescTeams"; |
||||||
|
CanBeUsedByBusiness = true; |
||||||
|
|
||||||
|
TrialPeriodDays = 7; |
||||||
|
|
||||||
|
HasGroups = true; |
||||||
|
HasDirectory = true; |
||||||
|
HasEvents = true; |
||||||
|
HasTotp = true; |
||||||
|
Has2fa = true; |
||||||
|
HasApi = true; |
||||||
|
UsersGetPremium = true; |
||||||
|
|
||||||
|
UpgradeSortOrder = 2; |
||||||
|
DisplaySortOrder = 2; |
||||||
|
|
||||||
|
PasswordManager = new TeamsStarterPasswordManagerFeatures(); |
||||||
|
SecretsManager = new TeamsStarterSecretsManagerFeatures(); |
||||||
|
} |
||||||
|
|
||||||
|
private record TeamsStarterSecretsManagerFeatures : SecretsManagerPlanFeatures |
||||||
|
{ |
||||||
|
public TeamsStarterSecretsManagerFeatures() |
||||||
|
{ |
||||||
|
BaseSeats = 0; |
||||||
|
BasePrice = 0; |
||||||
|
BaseServiceAccount = 50; |
||||||
|
|
||||||
|
HasAdditionalSeatsOption = true; |
||||||
|
HasAdditionalServiceAccountOption = true; |
||||||
|
|
||||||
|
AllowSeatAutoscale = true; |
||||||
|
AllowServiceAccountsAutoscale = true; |
||||||
|
|
||||||
|
StripeSeatPlanId = "secrets-manager-teams-seat-monthly"; |
||||||
|
StripeServiceAccountPlanId = "secrets-manager-service-account-monthly"; |
||||||
|
SeatPrice = 7; |
||||||
|
AdditionalPricePerServiceAccount = 0.5M; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
private record TeamsStarterPasswordManagerFeatures : PasswordManagerPlanFeatures |
||||||
|
{ |
||||||
|
public TeamsStarterPasswordManagerFeatures() |
||||||
|
{ |
||||||
|
BaseSeats = 10; |
||||||
|
BaseStorageGb = 1; |
||||||
|
BasePrice = 20; |
||||||
|
|
||||||
|
MaxSeats = 10; |
||||||
|
|
||||||
|
HasAdditionalStorageOption = true; |
||||||
|
|
||||||
|
StripePlanId = "teams-org-starter"; |
||||||
|
AdditionalStoragePricePerGb = 0.5M; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue