-
+ |
{{ "passwordRisk" | i18n }}
-
+
{{ "criticalApplicationsWithCount" | i18n: criticalApps.length }}
diff --git a/apps/web/src/app/tools/risk-insights/risk-insights.component.ts b/apps/web/src/app/tools/risk-insights/risk-insights.component.ts
index 43d6da70e96..1c6a36b4454 100644
--- a/apps/web/src/app/tools/risk-insights/risk-insights.component.ts
+++ b/apps/web/src/app/tools/risk-insights/risk-insights.component.ts
@@ -1,9 +1,11 @@
import { CommonModule } from "@angular/common";
-import { Component } from "@angular/core";
+import { Component, OnInit } from "@angular/core";
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
import { ActivatedRoute, Router } from "@angular/router";
import { JslibModule } from "@bitwarden/angular/jslib.module";
+import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
+import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
import { AsyncActionsModule, ButtonModule, TabsModule } from "@bitwarden/components";
import { HeaderModule } from "../../layouts/header/header.module";
@@ -39,9 +41,10 @@ export enum RiskInsightsTabType {
TabsModule,
],
})
-export class RiskInsightsComponent {
+export class RiskInsightsComponent implements OnInit {
tabIndex: RiskInsightsTabType;
dataLastUpdated = new Date();
+ isCritialAppsFeatureEnabled = false;
apps: any[] = [];
criticalApps: any[] = [];
@@ -65,9 +68,16 @@ export class RiskInsightsComponent {
});
};
+ async ngOnInit() {
+ this.isCritialAppsFeatureEnabled = await this.configService.getFeatureFlag(
+ FeatureFlag.CriticalApps,
+ );
+ }
+
constructor(
protected route: ActivatedRoute,
private router: Router,
+ private configService: ConfigService,
) {
route.queryParams.pipe(takeUntilDestroyed()).subscribe(({ tabIndex }) => {
this.tabIndex = !isNaN(tabIndex) ? tabIndex : RiskInsightsTabType.AllApps;
diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts
index ea016e34350..2679a01b9f2 100644
--- a/libs/common/src/enums/feature-flag.enum.ts
+++ b/libs/common/src/enums/feature-flag.enum.ts
@@ -35,6 +35,7 @@ export enum FeatureFlag {
AccessIntelligence = "pm-13227-access-intelligence",
Pm13322AddPolicyDefinitions = "pm-13322-add-policy-definitions",
LimitCollectionCreationDeletionSplit = "pm-10863-limit-collection-creation-deletion-split",
+ CriticalApps = "pm-14466-risk-insights-critical-application",
}
export type AllowedFeatureFlagTypes = boolean | number | string;
@@ -80,6 +81,7 @@ export const DefaultFeatureFlagValue = {
[FeatureFlag.AccessIntelligence]: FALSE,
[FeatureFlag.Pm13322AddPolicyDefinitions]: FALSE,
[FeatureFlag.LimitCollectionCreationDeletionSplit]: FALSE,
+ [FeatureFlag.CriticalApps]: FALSE,
} satisfies Record;
export type DefaultFeatureFlagValueType = typeof DefaultFeatureFlagValue;
|