mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-27722] Deprecate risk insights terminology and rename to access intelligence (#17170)
* Deprecate risk insights terminology and rename to access intelligence
This commit is contained in:
@@ -2,17 +2,12 @@
|
||||
<app-side-nav variant="secondary" *ngIf="organization$ | async as organization">
|
||||
<bit-nav-logo [openIcon]="logo" route="." [label]="'adminConsole' | i18n"></bit-nav-logo>
|
||||
<org-switcher [filter]="orgFilter" [hideNewButton]="hideNewOrgButton$ | async"></org-switcher>
|
||||
<bit-nav-group
|
||||
<bit-nav-item
|
||||
icon="bwi-dashboard"
|
||||
*ngIf="organization.useRiskInsights && organization.canAccessReports"
|
||||
*ngIf="organization.useAccessIntelligence && organization.canAccessReports"
|
||||
[text]="'accessIntelligence' | i18n"
|
||||
route="access-intelligence"
|
||||
>
|
||||
<bit-nav-item
|
||||
[text]="'riskInsights' | i18n"
|
||||
route="access-intelligence/risk-insights"
|
||||
></bit-nav-item>
|
||||
</bit-nav-group>
|
||||
></bit-nav-item>
|
||||
<bit-nav-item
|
||||
icon="bwi-collection-shared"
|
||||
[text]="'collections' | i18n"
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
"accessIntelligence": {
|
||||
"message": "Access Intelligence"
|
||||
},
|
||||
"riskInsights": {
|
||||
"message": "Risk Insights"
|
||||
},
|
||||
"passwordRisk": {
|
||||
"message": "Password Risk"
|
||||
},
|
||||
@@ -4445,8 +4442,9 @@
|
||||
"updateBrowser": {
|
||||
"message": "Update browser"
|
||||
},
|
||||
"generatingYourRiskInsights": {
|
||||
"message": "Generating your Risk Insights..."
|
||||
|
||||
"generatingYourAccessIntelligence": {
|
||||
"message": "Generating your Access Intelligence..."
|
||||
},
|
||||
"riskInsightsRunReport": {
|
||||
"message": "Run report"
|
||||
|
||||
@@ -6,15 +6,20 @@ import { organizationPermissionsGuard } from "@bitwarden/web-vault/app/admin-con
|
||||
import { RiskInsightsComponent } from "./risk-insights.component";
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: "", pathMatch: "full", redirectTo: "risk-insights" },
|
||||
{
|
||||
path: "risk-insights",
|
||||
path: "",
|
||||
canActivate: [organizationPermissionsGuard((org) => org.canAccessReports)],
|
||||
component: RiskInsightsComponent,
|
||||
data: {
|
||||
titleId: "RiskInsights",
|
||||
titleId: "accessIntelligence",
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "risk-insights",
|
||||
redirectTo: "",
|
||||
pathMatch: "full",
|
||||
// Backwards compatibility: redirect old "risk-insights" route to new base route
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<!-- Show screen when there is report data OR when feature flag is disabled (show tabs even without data) -->
|
||||
<div class="tw-min-h-screen tw-flex tw-flex-col">
|
||||
<div>
|
||||
<h1 bitTypography="h1">{{ "riskInsights" | i18n }}</h1>
|
||||
<h1 bitTypography="h1">{{ "accessIntelligence" | i18n }}</h1>
|
||||
<div class="tw-text-main tw-max-w-4xl tw-mb-2" *ngIf="appsCount > 0">
|
||||
{{ "reviewAtRiskPasswords" | i18n }}
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<div class="tw-flex-col tw-flex tw-justify-center tw-items-center tw-gap-5 tw-mt-4">
|
||||
<div class="tw-flex tw-flex-col tw-items-center tw-justify-center tw-min-h-[70vh] tw-gap-4">
|
||||
<i
|
||||
class="bwi bwi-2x bwi-spinner bwi-spin tw-text-primary-600"
|
||||
class="bwi bwi-spinner bwi-spin bwi-3x tw-text-primary-600"
|
||||
title="{{ 'loading' | i18n }}"
|
||||
aria-hidden="true"
|
||||
></i>
|
||||
<h2 bitTypography="h1">{{ "generatingYourRiskInsights" | i18n }}</h2>
|
||||
<span class="tw-sr-only">{{ "loading" | i18n }}</span>
|
||||
<p bitTypography="h2" class="tw-text-main tw-mb-0">
|
||||
{{ "generatingYourAccessIntelligence" | i18n }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ describe("ORGANIZATIONS state", () => {
|
||||
allowAdminAccessToAllCollectionItems: false,
|
||||
familySponsorshipLastSyncDate: new Date(),
|
||||
userIsManagedByOrganization: false,
|
||||
useRiskInsights: false,
|
||||
useAccessIntelligence: false,
|
||||
useOrganizationDomains: false,
|
||||
useAdminSponsoredFamilies: false,
|
||||
isAdminInitiated: false,
|
||||
|
||||
@@ -62,7 +62,7 @@ export class OrganizationData {
|
||||
limitItemDeletion: boolean;
|
||||
allowAdminAccessToAllCollectionItems: boolean;
|
||||
userIsManagedByOrganization: boolean;
|
||||
useRiskInsights: boolean;
|
||||
useAccessIntelligence: boolean;
|
||||
useAdminSponsoredFamilies: boolean;
|
||||
isAdminInitiated: boolean;
|
||||
ssoEnabled: boolean;
|
||||
@@ -130,7 +130,7 @@ export class OrganizationData {
|
||||
this.limitItemDeletion = response.limitItemDeletion;
|
||||
this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems;
|
||||
this.userIsManagedByOrganization = response.userIsManagedByOrganization;
|
||||
this.useRiskInsights = response.useRiskInsights;
|
||||
this.useAccessIntelligence = response.useAccessIntelligence;
|
||||
this.useAdminSponsoredFamilies = response.useAdminSponsoredFamilies;
|
||||
this.isAdminInitiated = response.isAdminInitiated;
|
||||
this.ssoEnabled = response.ssoEnabled;
|
||||
|
||||
@@ -79,7 +79,7 @@ describe("Organization", () => {
|
||||
limitItemDeletion: false,
|
||||
allowAdminAccessToAllCollectionItems: true,
|
||||
userIsManagedByOrganization: false,
|
||||
useRiskInsights: false,
|
||||
useAccessIntelligence: false,
|
||||
useAdminSponsoredFamilies: false,
|
||||
isAdminInitiated: false,
|
||||
ssoEnabled: false,
|
||||
|
||||
@@ -93,7 +93,7 @@ export class Organization {
|
||||
* matches one of the verified domains of that organization, and the user is a member of it.
|
||||
*/
|
||||
userIsManagedByOrganization: boolean;
|
||||
useRiskInsights: boolean;
|
||||
useAccessIntelligence: boolean;
|
||||
useAdminSponsoredFamilies: boolean;
|
||||
isAdminInitiated: boolean;
|
||||
ssoEnabled: boolean;
|
||||
@@ -157,7 +157,7 @@ export class Organization {
|
||||
this.limitItemDeletion = obj.limitItemDeletion;
|
||||
this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems;
|
||||
this.userIsManagedByOrganization = obj.userIsManagedByOrganization;
|
||||
this.useRiskInsights = obj.useRiskInsights;
|
||||
this.useAccessIntelligence = obj.useAccessIntelligence;
|
||||
this.useAdminSponsoredFamilies = obj.useAdminSponsoredFamilies;
|
||||
this.isAdminInitiated = obj.isAdminInitiated;
|
||||
this.ssoEnabled = obj.ssoEnabled;
|
||||
|
||||
@@ -38,7 +38,7 @@ export class OrganizationResponse extends BaseResponse {
|
||||
limitCollectionDeletion: boolean;
|
||||
limitItemDeletion: boolean;
|
||||
allowAdminAccessToAllCollectionItems: boolean;
|
||||
useRiskInsights: boolean;
|
||||
useAccessIntelligence: boolean;
|
||||
|
||||
constructor(response: any) {
|
||||
super(response);
|
||||
@@ -80,6 +80,7 @@ export class OrganizationResponse extends BaseResponse {
|
||||
this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(
|
||||
"AllowAdminAccessToAllCollectionItems",
|
||||
);
|
||||
this.useRiskInsights = this.getResponseProperty("UseRiskInsights");
|
||||
// Map from backend API property (UseRiskInsights) to domain model property (useAccessIntelligence)
|
||||
this.useAccessIntelligence = this.getResponseProperty("UseRiskInsights");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
|
||||
limitItemDeletion: boolean;
|
||||
allowAdminAccessToAllCollectionItems: boolean;
|
||||
userIsManagedByOrganization: boolean;
|
||||
useRiskInsights: boolean;
|
||||
useAccessIntelligence: boolean;
|
||||
useAdminSponsoredFamilies: boolean;
|
||||
isAdminInitiated: boolean;
|
||||
ssoEnabled: boolean;
|
||||
@@ -129,7 +129,8 @@ export class ProfileOrganizationResponse extends BaseResponse {
|
||||
"AllowAdminAccessToAllCollectionItems",
|
||||
);
|
||||
this.userIsManagedByOrganization = this.getResponseProperty("UserIsManagedByOrganization");
|
||||
this.useRiskInsights = this.getResponseProperty("UseRiskInsights");
|
||||
// Map from backend API property (UseRiskInsights) to domain model property (useAccessIntelligence)
|
||||
this.useAccessIntelligence = this.getResponseProperty("UseRiskInsights");
|
||||
this.useAdminSponsoredFamilies = this.getResponseProperty("UseAdminSponsoredFamilies");
|
||||
this.isAdminInitiated = this.getResponseProperty("IsAdminInitiated");
|
||||
this.ssoEnabled = this.getResponseProperty("SsoEnabled") ?? false;
|
||||
|
||||
@@ -51,10 +51,10 @@ describe("Default task service", () => {
|
||||
mockGetAllOrgs$.mockReturnValue(
|
||||
new BehaviorSubject([
|
||||
{
|
||||
useRiskInsights: false,
|
||||
useAccessIntelligence: false,
|
||||
},
|
||||
{
|
||||
useRiskInsights: true,
|
||||
useAccessIntelligence: true,
|
||||
},
|
||||
] as Organization[]),
|
||||
);
|
||||
@@ -70,10 +70,10 @@ describe("Default task service", () => {
|
||||
mockGetAllOrgs$.mockReturnValue(
|
||||
new BehaviorSubject([
|
||||
{
|
||||
useRiskInsights: false,
|
||||
useAccessIntelligence: false,
|
||||
},
|
||||
{
|
||||
useRiskInsights: false,
|
||||
useAccessIntelligence: false,
|
||||
},
|
||||
] as Organization[]),
|
||||
);
|
||||
@@ -91,7 +91,7 @@ describe("Default task service", () => {
|
||||
mockGetAllOrgs$.mockReturnValue(
|
||||
new BehaviorSubject([
|
||||
{
|
||||
useRiskInsights: true,
|
||||
useAccessIntelligence: true,
|
||||
},
|
||||
] as Organization[]),
|
||||
);
|
||||
@@ -101,7 +101,7 @@ describe("Default task service", () => {
|
||||
mockGetAllOrgs$.mockReturnValue(
|
||||
new BehaviorSubject([
|
||||
{
|
||||
useRiskInsights: false,
|
||||
useAccessIntelligence: false,
|
||||
},
|
||||
] as Organization[]),
|
||||
);
|
||||
@@ -163,7 +163,7 @@ describe("Default task service", () => {
|
||||
mockGetAllOrgs$.mockReturnValue(
|
||||
new BehaviorSubject([
|
||||
{
|
||||
useRiskInsights: true,
|
||||
useAccessIntelligence: true,
|
||||
},
|
||||
] as Organization[]),
|
||||
);
|
||||
@@ -173,7 +173,7 @@ describe("Default task service", () => {
|
||||
mockGetAllOrgs$.mockReturnValue(
|
||||
new BehaviorSubject([
|
||||
{
|
||||
useRiskInsights: false,
|
||||
useAccessIntelligence: false,
|
||||
},
|
||||
] as Organization[]),
|
||||
);
|
||||
|
||||
@@ -48,7 +48,7 @@ export class DefaultTaskService implements TaskService {
|
||||
|
||||
tasksEnabled$ = perUserCache$((userId) => {
|
||||
return this.organizationService.organizations$(userId).pipe(
|
||||
map((orgs) => orgs.some((o) => o.useRiskInsights)),
|
||||
map((orgs) => orgs.some((o) => o.useAccessIntelligence)),
|
||||
distinctUntilChanged(),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user