Remove sm-ga-billing feature flag (#6213)

This commit is contained in:
Thomas Rittson 2023-09-20 09:35:20 +10:00 committed by GitHub
parent e68e449aff
commit 284eda6cd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 22 deletions

View File

@ -12,8 +12,6 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga
import { BitwardenProductType, PlanType } from "@bitwarden/common/billing/enums";
import { OrganizationSubscriptionResponse } from "@bitwarden/common/billing/models/response/organization-subscription.response";
import { BillingSubscriptionItemResponse } from "@bitwarden/common/billing/models/response/subscription.response";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
@ -62,7 +60,6 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
private organizationApiService: OrganizationApiServiceAbstraction,
private route: ActivatedRoute,
private dialogService: DialogService,
private configService: ConfigServiceAbstraction,
private datePipe: DatePipe
) {}
@ -133,13 +130,6 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
!this.subscriptionMarkedForCancel;
this.loading = false;
// Remove the remaining lines when the sm-ga-billing flag is deleted
const smBillingEnabled = await this.configService.getFeatureFlag<boolean>(
FeatureFlag.SecretsManagerBilling
);
this.showSecretsManagerSubscribe = this.showSecretsManagerSubscribe && smBillingEnabled;
this.showAdjustSecretsManager = this.showAdjustSecretsManager && smBillingEnabled;
}
get subscription() {

View File

@ -276,7 +276,7 @@
<!-- Secrets Manager -->
<div class="tw-my-10">
<sm-subscribe
*ngIf="showSecretsManagerSubscribe && planOffersSecretsManager"
*ngIf="planOffersSecretsManager"
[formGroup]="formGroup.controls.secretsManager"
[selectedPlan]="selectedSecretsManagerPlan"
[upgradeOrganization]="!createOrganization"

View File

@ -23,8 +23,6 @@ import { ProviderOrganizationCreateRequest } from "@bitwarden/common/admin-conso
import { BitwardenProductType, PaymentMethodType, PlanType } from "@bitwarden/common/billing/enums";
import { PlanResponse } from "@bitwarden/common/billing/models/response/plan.response";
import { ProductType } from "@bitwarden/common/enums";
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
import { ConfigServiceAbstraction } from "@bitwarden/common/platform/abstractions/config/config.service.abstraction";
import { CryptoService } from "@bitwarden/common/platform/abstractions/crypto.service";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
@ -94,7 +92,6 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
singleOrgPolicyAppliesToActiveUser = false;
isInTrialFlow = false;
discount = 0;
showSecretsManagerSubscribe: boolean;
secretsManagerSubscription = secretsManagerSubscribeFormFactory(this.formBuilder);
@ -129,8 +126,7 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
private logService: LogService,
private messagingService: MessagingService,
private formBuilder: FormBuilder,
private organizationApiService: OrganizationApiServiceAbstraction,
private configService: ConfigServiceAbstraction
private organizationApiService: OrganizationApiServiceAbstraction
) {
this.selfHosted = platformUtilsService.isSelfHost();
}
@ -169,11 +165,6 @@ export class OrganizationPlansComponent implements OnInit, OnDestroy {
this.singleOrgPolicyAppliesToActiveUser = policyAppliesToActiveUser;
});
this.showSecretsManagerSubscribe = await this.configService.getFeatureFlag<boolean>(
FeatureFlag.SecretsManagerBilling,
false
);
this.loading = false;
}

View File

@ -3,7 +3,6 @@ export enum FeatureFlag {
DisplayLowKdfIterationWarningFlag = "display-kdf-iteration-warning",
TrustedDeviceEncryption = "trusted-device-encryption",
AutofillV2 = "autofill-v2",
SecretsManagerBilling = "sm-ga-billing",
}
// Replace this with a type safe lookup of the feature flag values in PM-2282