mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
[PM-20277] Disable fingerprint on org invite (#14285)
This commit is contained in:
@@ -24,7 +24,6 @@ import { OrgKey } from "@bitwarden/common/types/key";
|
|||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { KeyService } from "@bitwarden/key-management";
|
import { KeyService } from "@bitwarden/key-management";
|
||||||
|
|
||||||
import { OrganizationTrustComponent } from "../../admin-console/organizations/manage/organization-trust.component";
|
|
||||||
import { I18nService } from "../../core/i18n.service";
|
import { I18nService } from "../../core/i18n.service";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -200,11 +199,6 @@ describe("AcceptOrganizationInviteService", () => {
|
|||||||
encryptedString: "encryptedString",
|
encryptedString: "encryptedString",
|
||||||
} as EncString);
|
} as EncString);
|
||||||
|
|
||||||
jest.mock("../../admin-console/organizations/manage/organization-trust.component");
|
|
||||||
OrganizationTrustComponent.open = jest.fn().mockReturnValue({
|
|
||||||
closed: new BehaviorSubject(true),
|
|
||||||
});
|
|
||||||
|
|
||||||
await globalState.update(() => invite);
|
await globalState.update(() => invite);
|
||||||
|
|
||||||
policyService.getResetPasswordPolicyOptions.mockReturnValue([
|
policyService.getResetPasswordPolicyOptions.mockReturnValue([
|
||||||
@@ -217,7 +211,6 @@ describe("AcceptOrganizationInviteService", () => {
|
|||||||
const result = await sut.validateAndAcceptInvite(invite);
|
const result = await sut.validateAndAcceptInvite(invite);
|
||||||
|
|
||||||
expect(result).toBe(true);
|
expect(result).toBe(true);
|
||||||
expect(OrganizationTrustComponent.open).toHaveBeenCalled();
|
|
||||||
expect(encryptService.encapsulateKeyUnsigned).toHaveBeenCalledWith(
|
expect(encryptService.encapsulateKeyUnsigned).toHaveBeenCalledWith(
|
||||||
{ key: "userKey" },
|
{ key: "userKey" },
|
||||||
Utils.fromB64ToArray("publicKey"),
|
Utils.fromB64ToArray("publicKey"),
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ import { OrgKey } from "@bitwarden/common/types/key";
|
|||||||
import { DialogService } from "@bitwarden/components";
|
import { DialogService } from "@bitwarden/components";
|
||||||
import { KeyService } from "@bitwarden/key-management";
|
import { KeyService } from "@bitwarden/key-management";
|
||||||
|
|
||||||
import { OrganizationTrustComponent } from "../../admin-console/organizations/manage/organization-trust.component";
|
|
||||||
|
|
||||||
import { OrganizationInvite } from "./organization-invite";
|
import { OrganizationInvite } from "./organization-invite";
|
||||||
|
|
||||||
// We're storing the organization invite for 2 reasons:
|
// We're storing the organization invite for 2 reasons:
|
||||||
@@ -189,15 +187,6 @@ export class AcceptOrganizationInviteService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const publicKey = Utils.fromB64ToArray(response.publicKey);
|
const publicKey = Utils.fromB64ToArray(response.publicKey);
|
||||||
const dialogRef = OrganizationTrustComponent.open(this.dialogService, {
|
|
||||||
name: invite.organizationName,
|
|
||||||
orgId: invite.organizationId,
|
|
||||||
publicKey,
|
|
||||||
});
|
|
||||||
const result = await firstValueFrom(dialogRef.closed);
|
|
||||||
if (result !== true) {
|
|
||||||
throw new Error("Organization not trusted, aborting user key rotation");
|
|
||||||
}
|
|
||||||
|
|
||||||
const activeUserId = (await firstValueFrom(this.accountService.activeAccount$)).id;
|
const activeUserId = (await firstValueFrom(this.accountService.activeAccount$)).id;
|
||||||
const userKey = await firstValueFrom(this.keyService.userKey$(activeUserId));
|
const userKey = await firstValueFrom(this.keyService.userKey$(activeUserId));
|
||||||
|
|||||||
Reference in New Issue
Block a user