From 59a1b4d79ecfd639bc7d9412a93fdab701b22cde Mon Sep 17 00:00:00 2001 From: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com> Date: Mon, 22 Dec 2025 14:14:23 -0600 Subject: [PATCH 1/2] Remove FF: pm-22415-tax-id-warnings (#17871) --- ...rganization-payment-details.component.html | 2 +- .../organization-payment-details.component.ts | 62 +++++++------------ .../components/tax-id-warning.component.ts | 37 +++++------ .../provider-payment-details.component.html | 2 +- .../provider-payment-details.component.ts | 60 +++++++----------- libs/common/src/enums/feature-flag.enum.ts | 2 - 6 files changed, 63 insertions(+), 102 deletions(-) diff --git a/apps/web/src/app/billing/organizations/payment-details/organization-payment-details.component.html b/apps/web/src/app/billing/organizations/payment-details/organization-payment-details.component.html index cd31f1f33be..504cfcdeccd 100644 --- a/apps/web/src/app/billing/organizations/payment-details/organization-payment-details.component.html +++ b/apps/web/src/app/billing/organizations/payment-details/organization-payment-details.component.html @@ -29,7 +29,7 @@ diff --git a/apps/web/src/app/billing/organizations/payment-details/organization-payment-details.component.ts b/apps/web/src/app/billing/organizations/payment-details/organization-payment-details.component.ts index 9609160089b..e989185e582 100644 --- a/apps/web/src/app/billing/organizations/payment-details/organization-payment-details.component.ts +++ b/apps/web/src/app/billing/organizations/payment-details/organization-payment-details.component.ts @@ -22,8 +22,6 @@ import { OrganizationService } from "@bitwarden/common/admin-console/abstraction import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; -import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; -import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { getById } from "@bitwarden/common/platform/misc"; import { DialogService } from "@bitwarden/components"; import { CommandDefinition, MessageListener } from "@bitwarden/messaging"; @@ -118,12 +116,9 @@ export class OrganizationPaymentDetailsComponent implements OnInit, OnDestroy { private destroy$ = new Subject(); - protected enableTaxIdWarning!: boolean; - constructor( private accountService: AccountService, private activatedRoute: ActivatedRoute, - private configService: ConfigService, private dialogService: DialogService, private messageListener: MessageListener, private organizationService: OrganizationService, @@ -140,36 +135,30 @@ export class OrganizationPaymentDetailsComponent implements OnInit, OnDestroy { await this.changePaymentMethod(); } - this.enableTaxIdWarning = await this.configService.getFeatureFlag( - FeatureFlag.PM22415_TaxIDWarnings, - ); - - if (this.enableTaxIdWarning) { - this.organizationWarningsService.taxIdWarningRefreshed$ - .pipe( - switchMap((warning) => - combineLatest([ - of(warning), - this.organization$.pipe(take(1)).pipe( - mapOrganizationToSubscriber, - switchMap((organization) => - this.subscriberBillingClient.getBillingAddress(organization), - ), + this.organizationWarningsService.taxIdWarningRefreshed$ + .pipe( + switchMap((warning) => + combineLatest([ + of(warning), + this.organization$.pipe(take(1)).pipe( + mapOrganizationToSubscriber, + switchMap((organization) => + this.subscriberBillingClient.getBillingAddress(organization), ), - ]), - ), - takeUntil(this.destroy$), - ) - .subscribe(([taxIdWarning, billingAddress]) => { - if (this.viewState$.value) { - this.viewState$.next({ - ...this.viewState$.value, - taxIdWarning, - billingAddress, - }); - } - }); - } + ), + ]), + ), + takeUntil(this.destroy$), + ) + .subscribe(([taxIdWarning, billingAddress]) => { + if (this.viewState$.value) { + this.viewState$.next({ + ...this.viewState$.value, + taxIdWarning, + billingAddress, + }); + } + }); this.messageListener .messages$(BANK_ACCOUNT_VERIFIED_COMMAND) @@ -216,10 +205,7 @@ export class OrganizationPaymentDetailsComponent implements OnInit, OnDestroy { setBillingAddress = (billingAddress: BillingAddress) => { if (this.viewState$.value) { - if ( - this.enableTaxIdWarning && - this.viewState$.value.billingAddress?.taxId !== billingAddress.taxId - ) { + if (this.viewState$.value.billingAddress?.taxId !== billingAddress.taxId) { this.organizationWarningsService.refreshTaxIdWarning(); } this.viewState$.next({ diff --git a/apps/web/src/app/billing/warnings/components/tax-id-warning.component.ts b/apps/web/src/app/billing/warnings/components/tax-id-warning.component.ts index c0fe5626fcb..f2adcaccf30 100644 --- a/apps/web/src/app/billing/warnings/components/tax-id-warning.component.ts +++ b/apps/web/src/app/billing/warnings/components/tax-id-warning.component.ts @@ -12,8 +12,6 @@ import { import { Account, AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; -import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; -import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BannerModule, DialogService } from "@bitwarden/components"; import { BILLING_DISK, StateProvider, UserKeyDefinition } from "@bitwarden/state"; @@ -88,23 +86,21 @@ type GetWarning$ = () => Observable; @Component({ selector: "app-tax-id-warning", template: ` - @if (enableTaxIdWarning$ | async) { - @let view = view$ | async; + @let view = view$ | async; - @if (view) { - - {{ view.message }} - - {{ view.callToAction }} - - - } + @if (view) { + + {{ view.message }} + + {{ view.callToAction }} + + } `, imports: [BannerModule, SharedModule], @@ -120,10 +116,6 @@ export class TaxIdWarningComponent implements OnInit { // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() billingAddressUpdated = new EventEmitter(); - protected enableTaxIdWarning$ = this.configService.getFeatureFlag$( - FeatureFlag.PM22415_TaxIDWarnings, - ); - protected userId$ = this.accountService.activeAccount$.pipe( filter((account): account is Account => account !== null), getUserId, @@ -209,7 +201,6 @@ export class TaxIdWarningComponent implements OnInit { constructor( private accountService: AccountService, - private configService: ConfigService, private dialogService: DialogService, private i18nService: I18nService, private subscriberBillingClient: SubscriberBillingClient, diff --git a/bitwarden_license/bit-web/src/app/billing/providers/payment-details/provider-payment-details.component.html b/bitwarden_license/bit-web/src/app/billing/providers/payment-details/provider-payment-details.component.html index fa45bbb32d3..d0da7416115 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/payment-details/provider-payment-details.component.html +++ b/bitwarden_license/bit-web/src/app/billing/providers/payment-details/provider-payment-details.component.html @@ -21,7 +21,7 @@ diff --git a/bitwarden_license/bit-web/src/app/billing/providers/payment-details/provider-payment-details.component.ts b/bitwarden_license/bit-web/src/app/billing/providers/payment-details/provider-payment-details.component.ts index 183e6098471..1de271bcf28 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/payment-details/provider-payment-details.component.ts +++ b/bitwarden_license/bit-web/src/app/billing/providers/payment-details/provider-payment-details.component.ts @@ -21,8 +21,6 @@ import { ProviderService } from "@bitwarden/common/admin-console/abstractions/pr import { Provider } from "@bitwarden/common/admin-console/models/domain/provider"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; -import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; -import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { CommandDefinition, MessageListener } from "@bitwarden/messaging"; import { UserId } from "@bitwarden/user-core"; import { SubscriberBillingClient } from "@bitwarden/web-vault/app/billing/clients"; @@ -119,13 +117,10 @@ export class ProviderPaymentDetailsComponent implements OnInit, OnDestroy { private destroy$ = new Subject(); - protected enableTaxIdWarning!: boolean; - constructor( private accountService: AccountService, private activatedRoute: ActivatedRoute, private billingClient: SubscriberBillingClient, - private configService: ConfigService, private messageListener: MessageListener, private providerService: ProviderService, private providerWarningsService: ProviderWarningsService, @@ -133,34 +128,28 @@ export class ProviderPaymentDetailsComponent implements OnInit, OnDestroy { ) {} async ngOnInit() { - this.enableTaxIdWarning = await this.configService.getFeatureFlag( - FeatureFlag.PM22415_TaxIDWarnings, - ); - - if (this.enableTaxIdWarning) { - this.providerWarningsService.taxIdWarningRefreshed$ - .pipe( - switchMap((warning) => - combineLatest([ - of(warning), - this.provider$.pipe(take(1)).pipe( - mapProviderToSubscriber, - switchMap((provider) => this.subscriberBillingClient.getBillingAddress(provider)), - ), - ]), - ), - takeUntil(this.destroy$), - ) - .subscribe(([taxIdWarning, billingAddress]) => { - if (this.viewState$.value) { - this.viewState$.next({ - ...this.viewState$.value, - taxIdWarning, - billingAddress, - }); - } - }); - } + this.providerWarningsService.taxIdWarningRefreshed$ + .pipe( + switchMap((warning) => + combineLatest([ + of(warning), + this.provider$.pipe(take(1)).pipe( + mapProviderToSubscriber, + switchMap((provider) => this.subscriberBillingClient.getBillingAddress(provider)), + ), + ]), + ), + takeUntil(this.destroy$), + ) + .subscribe(([taxIdWarning, billingAddress]) => { + if (this.viewState$.value) { + this.viewState$.next({ + ...this.viewState$.value, + taxIdWarning, + billingAddress, + }); + } + }); this.messageListener .messages$(BANK_ACCOUNT_VERIFIED_COMMAND) @@ -197,10 +186,7 @@ export class ProviderPaymentDetailsComponent implements OnInit, OnDestroy { setBillingAddress = (billingAddress: BillingAddress) => { if (this.viewState$.value) { - if ( - this.enableTaxIdWarning && - this.viewState$.value.billingAddress?.taxId !== billingAddress.taxId - ) { + if (this.viewState$.value.billingAddress?.taxId !== billingAddress.taxId) { this.providerWarningsService.refreshTaxIdWarning(); } this.viewState$.next({ diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index 3bde0eada0a..f905c62288e 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -26,7 +26,6 @@ export enum FeatureFlag { /* Billing */ TrialPaymentOptional = "PM-8163-trial-payment", - PM22415_TaxIDWarnings = "pm-22415-tax-id-warnings", PM24032_NewNavigationPremiumUpgradeButton = "pm-24032-new-navigation-premium-upgrade-button", PM25379_UseNewOrganizationMetadataStructure = "pm-25379-use-new-organization-metadata-structure", PM24996_ImplementUpgradeFromFreeDialog = "pm-24996-implement-upgrade-from-free-dialog", @@ -137,7 +136,6 @@ export const DefaultFeatureFlagValue = { /* Billing */ [FeatureFlag.TrialPaymentOptional]: FALSE, - [FeatureFlag.PM22415_TaxIDWarnings]: FALSE, [FeatureFlag.PM24032_NewNavigationPremiumUpgradeButton]: FALSE, [FeatureFlag.PM25379_UseNewOrganizationMetadataStructure]: FALSE, [FeatureFlag.PM24996_ImplementUpgradeFromFreeDialog]: FALSE, From 328ff89747a83c37ebfb574f1c55bf2dd2e2f9bd Mon Sep 17 00:00:00 2001 From: gitclonebrian <235774926+gitclonebrian@users.noreply.github.com> Date: Mon, 22 Dec 2025 15:19:08 -0500 Subject: [PATCH 2/2] bumped `cargo deny` version to fix CVSS error (#18091) --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 47c5e9faef0..b46204514b8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -144,7 +144,7 @@ jobs: - name: Install cargo-deny uses: taiki-e/install-action@073d46cba2cde38f6698c798566c1b3e24feeb44 # v2.62.67 with: - tool: cargo-deny@0.18.5 + tool: cargo-deny@0.18.6 - name: Run cargo deny working-directory: ./apps/desktop/desktop_native