1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-29 17:38:04 +01:00

Add the free family policy behind flag

This commit is contained in:
Cy Okeke 2024-11-07 12:06:12 +01:00
parent 91c2e305f1
commit a8cd718405
No known key found for this signature in database
GPG Key ID: 88B341B55C84B45C
2 changed files with 11 additions and 2 deletions

View File

@ -20,10 +20,17 @@ export class AppComponent extends BaseAppComponent implements OnInit {
this.policyListService.addPolicies([
new MaximumVaultTimeoutPolicy(),
new DisablePersonalVaultExportPolicy(),
new FreeFamiliesSponsorshipPolicy(),
new ActivateAutofillPolicy(),
]);
this.configService
.getFeatureFlag(FeatureFlag.DisableFreeFamiliesSponsorship)
.then((isFreeFamilyEnabled) => {
if (isFreeFamilyEnabled) {
this.policyListService.addPolicies([new FreeFamiliesSponsorshipPolicy()]);
}
this.policyListService.addPolicies([new ActivateAutofillPolicy()]);
});
this.configService.getFeatureFlag(FeatureFlag.IdpAutoSubmitLogin).then((enabled) => {
if (
enabled &&

View File

@ -36,6 +36,7 @@ export enum FeatureFlag {
AccessIntelligence = "pm-13227-access-intelligence",
Pm13322AddPolicyDefinitions = "pm-13322-add-policy-definitions",
LimitCollectionCreationDeletionSplit = "pm-10863-limit-collection-creation-deletion-split",
DisableFreeFamiliesSponsorship = "PM-12274-disable-free-families-sponsorship",
}
export type AllowedFeatureFlagTypes = boolean | number | string;
@ -82,6 +83,7 @@ export const DefaultFeatureFlagValue = {
[FeatureFlag.AccessIntelligence]: FALSE,
[FeatureFlag.Pm13322AddPolicyDefinitions]: FALSE,
[FeatureFlag.LimitCollectionCreationDeletionSplit]: FALSE,
[FeatureFlag.DisableFreeFamiliesSponsorship]: FALSE,
} satisfies Record<FeatureFlag, AllowedFeatureFlagTypes>;
export type DefaultFeatureFlagValueType = typeof DefaultFeatureFlagValue;