From 874fe0fd1ebde3392695183edba294a25451a0d8 Mon Sep 17 00:00:00 2001 From: Tom <144813356+ttalty@users.noreply.github.com> Date: Fri, 30 May 2025 12:55:14 -0400 Subject: [PATCH] Adding userGuid to the member details object (#14899) --- .../dirt/reports/risk-insights/models/password-health.ts | 1 + .../response/member-cipher-details.response.ts | 2 ++ .../risk-insights/services/risk-insights-report.service.ts | 6 +++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/password-health.ts b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/password-health.ts index d24d8386ecd..acb4a116b8f 100644 --- a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/password-health.ts +++ b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/password-health.ts @@ -97,6 +97,7 @@ export type ExposedPasswordDetail = { * organization member to a cipher */ export type MemberDetailsFlat = { + userGuid: string; userName: string; email: string; cipherId: string; diff --git a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/response/member-cipher-details.response.ts b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/response/member-cipher-details.response.ts index fcf5ada4b2c..7aa52330663 100644 --- a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/response/member-cipher-details.response.ts +++ b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/response/member-cipher-details.response.ts @@ -1,6 +1,7 @@ import { BaseResponse } from "@bitwarden/common/models/response/base.response"; export class MemberCipherDetailsResponse extends BaseResponse { + userGuid: string; userName: string; email: string; useKeyConnector: boolean; @@ -8,6 +9,7 @@ export class MemberCipherDetailsResponse extends BaseResponse { constructor(response: any) { super(response); + this.userGuid = this.getResponseProperty("UserGuid"); this.userName = this.getResponseProperty("UserName"); this.email = this.getResponseProperty("Email"); this.useKeyConnector = this.getResponseProperty("UseKeyConnector"); diff --git a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/risk-insights-report.service.ts b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/risk-insights-report.service.ts index 6fdab58115d..afd246e1836 100644 --- a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/risk-insights-report.service.ts +++ b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/services/risk-insights-report.service.ts @@ -48,7 +48,9 @@ export class RiskInsightsReportService { const results$ = zip(allCiphers$, memberCiphers$).pipe( map(([allCiphers, memberCiphers]) => { const details: MemberDetailsFlat[] = memberCiphers.flatMap((dtl) => - dtl.cipherIds.map((c) => this.getMemberDetailsFlat(dtl.userName, dtl.email, c)), + dtl.cipherIds.map((c) => + this.getMemberDetailsFlat(dtl.userGuid, dtl.userName, dtl.email, c), + ), ); return [allCiphers, details] as const; }), @@ -408,11 +410,13 @@ export class RiskInsightsReportService { } private getMemberDetailsFlat( + userGuid: string, userName: string, email: string, cipherId: string, ): MemberDetailsFlat { return { + userGuid: userGuid, userName: userName, email: email, cipherId: cipherId,