diff --git a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html index e5af0faa16..accb5f77fd 100644 --- a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html +++ b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.html @@ -2,17 +2,12 @@ - - - + > 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({ diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/risk-insights.component.html b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/risk-insights.component.html index 6d030e2006..d5c66f3f10 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/risk-insights.component.html +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/risk-insights.component.html @@ -37,7 +37,7 @@
-

{{ "riskInsights" | i18n }}

+

{{ "accessIntelligence" | i18n }}

{{ "reviewAtRiskPasswords" | i18n }}
diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/risk-insights-loading.component.html b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/risk-insights-loading.component.html index 0c5b74eead..9d5712012b 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/risk-insights-loading.component.html +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/shared/risk-insights-loading.component.html @@ -1,8 +1,11 @@ -
+
-

{{ "generatingYourRiskInsights" | i18n }}

+ {{ "loading" | i18n }} +

+ {{ "generatingYourAccessIntelligence" | i18n }} +

diff --git a/libs/common/src/admin-console/models/data/organization.data.spec.ts b/libs/common/src/admin-console/models/data/organization.data.spec.ts index bc74dd189b..53fc0d5ec3 100644 --- a/libs/common/src/admin-console/models/data/organization.data.spec.ts +++ b/libs/common/src/admin-console/models/data/organization.data.spec.ts @@ -58,7 +58,7 @@ describe("ORGANIZATIONS state", () => { allowAdminAccessToAllCollectionItems: false, familySponsorshipLastSyncDate: new Date(), userIsManagedByOrganization: false, - useRiskInsights: false, + useAccessIntelligence: false, useOrganizationDomains: false, useAdminSponsoredFamilies: false, isAdminInitiated: false, diff --git a/libs/common/src/admin-console/models/data/organization.data.ts b/libs/common/src/admin-console/models/data/organization.data.ts index e6bf9dbaaa..6424947d00 100644 --- a/libs/common/src/admin-console/models/data/organization.data.ts +++ b/libs/common/src/admin-console/models/data/organization.data.ts @@ -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; diff --git a/libs/common/src/admin-console/models/domain/organization.spec.ts b/libs/common/src/admin-console/models/domain/organization.spec.ts index cc158c7105..2ce674dcb3 100644 --- a/libs/common/src/admin-console/models/domain/organization.spec.ts +++ b/libs/common/src/admin-console/models/domain/organization.spec.ts @@ -79,7 +79,7 @@ describe("Organization", () => { limitItemDeletion: false, allowAdminAccessToAllCollectionItems: true, userIsManagedByOrganization: false, - useRiskInsights: false, + useAccessIntelligence: false, useAdminSponsoredFamilies: false, isAdminInitiated: false, ssoEnabled: false, diff --git a/libs/common/src/admin-console/models/domain/organization.ts b/libs/common/src/admin-console/models/domain/organization.ts index f320a675b6..55682e6235 100644 --- a/libs/common/src/admin-console/models/domain/organization.ts +++ b/libs/common/src/admin-console/models/domain/organization.ts @@ -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; diff --git a/libs/common/src/admin-console/models/response/organization.response.ts b/libs/common/src/admin-console/models/response/organization.response.ts index 235ea2f8d9..3f6443678b 100644 --- a/libs/common/src/admin-console/models/response/organization.response.ts +++ b/libs/common/src/admin-console/models/response/organization.response.ts @@ -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"); } } diff --git a/libs/common/src/admin-console/models/response/profile-organization.response.ts b/libs/common/src/admin-console/models/response/profile-organization.response.ts index dc5090f2c0..268ec1e4b6 100644 --- a/libs/common/src/admin-console/models/response/profile-organization.response.ts +++ b/libs/common/src/admin-console/models/response/profile-organization.response.ts @@ -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; diff --git a/libs/common/src/vault/tasks/services/default-task.service.spec.ts b/libs/common/src/vault/tasks/services/default-task.service.spec.ts index df755dd9f9..8fc2f902ca 100644 --- a/libs/common/src/vault/tasks/services/default-task.service.spec.ts +++ b/libs/common/src/vault/tasks/services/default-task.service.spec.ts @@ -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[]), ); diff --git a/libs/common/src/vault/tasks/services/default-task.service.ts b/libs/common/src/vault/tasks/services/default-task.service.ts index bbf58aec5e..5bd23ed860 100644 --- a/libs/common/src/vault/tasks/services/default-task.service.ts +++ b/libs/common/src/vault/tasks/services/default-task.service.ts @@ -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(), ); });