1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +00:00

Adding userGuid to the member details object (#14899)

This commit is contained in:
Tom
2025-05-30 12:55:14 -04:00
committed by GitHub
parent 895d54fd5e
commit 874fe0fd1e
3 changed files with 8 additions and 1 deletions

View File

@@ -97,6 +97,7 @@ export type ExposedPasswordDetail = {
* organization member to a cipher
*/
export type MemberDetailsFlat = {
userGuid: string;
userName: string;
email: string;
cipherId: string;

View File

@@ -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");

View File

@@ -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,