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:
@@ -97,6 +97,7 @@ export type ExposedPasswordDetail = {
|
||||
* organization member to a cipher
|
||||
*/
|
||||
export type MemberDetailsFlat = {
|
||||
userGuid: string;
|
||||
userName: string;
|
||||
email: string;
|
||||
cipherId: string;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user