From f1538e1a5fe429e609341cadf1e1e2e90d52ec32 Mon Sep 17 00:00:00 2001 From: Tom <144813356+ttalty@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:37:08 -0500 Subject: [PATCH] [PM-14525] remove member access feature flag (#11972) * Remove member access feature flag * removing unused code --- .../guards/is-enterprise-org.guard.ts | 7 ------- .../reporting/reports-home.component.ts | 21 ++++--------------- libs/common/src/enums/feature-flag.enum.ts | 2 -- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/apps/web/src/app/admin-console/organizations/guards/is-enterprise-org.guard.ts b/apps/web/src/app/admin-console/organizations/guards/is-enterprise-org.guard.ts index 3373f0cfd5..8a0d374997 100644 --- a/apps/web/src/app/admin-console/organizations/guards/is-enterprise-org.guard.ts +++ b/apps/web/src/app/admin-console/organizations/guards/is-enterprise-org.guard.ts @@ -6,10 +6,8 @@ import { RouterStateSnapshot, } from "@angular/router"; -import { canAccessFeature } from "@bitwarden/angular/platform/guard/feature-flag.guard"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { ProductTierType } from "@bitwarden/common/billing/enums"; -import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; import { DialogService } from "@bitwarden/components"; /** @@ -31,11 +29,6 @@ export function isEnterpriseOrgGuard(): CanActivateFn { return router.createUrlTree(["/"]); } - // TODO: Remove on "MemberAccessReport" feature flag cleanup - if (!canAccessFeature(FeatureFlag.MemberAccessReport)) { - return router.createUrlTree(["/"]); - } - if (org.productTierType != ProductTierType.Enterprise) { // Users without billing permission can't access billing if (!org.canEditSubscription) { diff --git a/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts b/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts index c89ff280dd..2007b5c9a6 100644 --- a/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts +++ b/apps/web/src/app/admin-console/organizations/reporting/reports-home.component.ts @@ -1,11 +1,9 @@ import { Component, OnInit } from "@angular/core"; import { ActivatedRoute, NavigationEnd, Router } from "@angular/router"; -import { filter, map, Observable, startWith, concatMap, firstValueFrom } from "rxjs"; +import { filter, map, Observable, startWith, concatMap } from "rxjs"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { ProductTierType } from "@bitwarden/common/billing/enums"; -import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; -import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { ReportVariant, reports, ReportType, ReportEntry } from "../../../tools/reports"; @@ -17,21 +15,13 @@ export class ReportsHomeComponent implements OnInit { reports$: Observable; homepage$: Observable; - private isMemberAccessReportEnabled: boolean; - constructor( private route: ActivatedRoute, private organizationService: OrganizationService, private router: Router, - private configService: ConfigService, ) {} async ngOnInit() { - // TODO: Remove on "MemberAccessReport" feature flag cleanup - this.isMemberAccessReportEnabled = await firstValueFrom( - this.configService.getFeatureFlag$(FeatureFlag.MemberAccessReport), - ); - this.homepage$ = this.router.events.pipe( filter((event) => event instanceof NavigationEnd), map((event) => this.isReportsHomepageRouteUrl((event as NavigationEnd).urlAfterRedirects)), @@ -69,17 +59,14 @@ export class ReportsHomeComponent implements OnInit { ...reports[ReportType.Inactive2fa], variant: reportRequiresUpgrade, }, - ]; - - if (this.isMemberAccessReportEnabled) { - reportsArray.push({ + { ...reports[ReportType.MemberAccessReport], variant: productType == ProductTierType.Enterprise ? ReportVariant.Enabled : ReportVariant.RequiresEnterprise, - }); - } + }, + ]; return reportsArray; } diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index 723fac226f..69298db654 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -14,7 +14,6 @@ export enum FeatureFlag { UseTreeWalkerApiForPageDetailsCollection = "use-tree-walker-api-for-page-details-collection", EmailVerification = "email-verification", InlineMenuFieldQualification = "inline-menu-field-qualification", - MemberAccessReport = "ac-2059-member-access-report", TwoFactorComponentRefactor = "two-factor-component-refactor", InlineMenuPositioningImprovements = "inline-menu-positioning-improvements", ProviderClientVaultPrivacyBanner = "ac-2833-provider-client-vault-privacy-banner", @@ -64,7 +63,6 @@ export const DefaultFeatureFlagValue = { [FeatureFlag.UseTreeWalkerApiForPageDetailsCollection]: FALSE, [FeatureFlag.EmailVerification]: FALSE, [FeatureFlag.InlineMenuFieldQualification]: FALSE, - [FeatureFlag.MemberAccessReport]: FALSE, [FeatureFlag.TwoFactorComponentRefactor]: FALSE, [FeatureFlag.InlineMenuPositioningImprovements]: FALSE, [FeatureFlag.ProviderClientVaultPrivacyBanner]: FALSE,