1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 21:33:27 +00:00

[AC-2708] Upgrading from a password manager only subscription (#10320)

* Add changes for the upgrade dialog

* Resolve the  free org to any org type besides Families

* Resolve the pr comments on navigation

* resolve family plan upgrade from free
This commit is contained in:
cyprain-okeke
2024-07-30 16:01:28 +01:00
committed by GitHub
parent 8c78959aaf
commit 6896ef2392
11 changed files with 1213 additions and 9 deletions

View File

@@ -5,3 +5,4 @@ export * from "./transaction-type.enum";
export * from "./bitwarden-product-type.enum";
export * from "./product-tier-type.enum";
export * from "./product-type.enum";
export * from "./plan-interval.enum";

View File

@@ -0,0 +1,4 @@
export enum PlanInterval {
Monthly = 0,
Annually = 1,
}

View File

@@ -5,3 +5,11 @@ export enum ProductTierType {
Enterprise = 3,
TeamsStarter = 4,
}
export function isNotSelfUpgradable(productType: ProductTierType): boolean {
return (
productType !== ProductTierType.Free &&
productType !== ProductTierType.TeamsStarter &&
productType !== ProductTierType.Families
);
}

View File

@@ -27,6 +27,7 @@ export enum FeatureFlag {
AC2828_ProviderPortalMembersPage = "AC-2828_provider-portal-members-page",
DeviceTrustLogging = "pm-8285-device-trust-logging",
AuthenticatorTwoFactorToken = "authenticator-2fa-token",
EnableUpgradePasswordManagerSub = "AC-2708-upgrade-password-manager-sub",
}
export type AllowedFeatureFlagTypes = boolean | number | string;
@@ -64,6 +65,7 @@ export const DefaultFeatureFlagValue = {
[FeatureFlag.AC2828_ProviderPortalMembersPage]: FALSE,
[FeatureFlag.DeviceTrustLogging]: FALSE,
[FeatureFlag.AuthenticatorTwoFactorToken]: FALSE,
[FeatureFlag.EnableUpgradePasswordManagerSub]: FALSE,
} satisfies Record<FeatureFlag, AllowedFeatureFlagTypes>;
export type DefaultFeatureFlagValueType = typeof DefaultFeatureFlagValue;