1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 20:24:01 +00:00

key connector url required to be provided when migrating user

This commit is contained in:
Maciej Zieniuk
2025-04-08 18:20:12 +01:00
parent a10cd49e53
commit db0ee9bb71
7 changed files with 51 additions and 105 deletions

View File

@@ -130,7 +130,10 @@ describe("ConvertToKeyConnectorCommand", () => {
expect(response).not.toBeNull();
expect(response.success).toEqual(true);
expect(keyConnectorService.migrateUser).toHaveBeenCalledWith(userId);
expect(keyConnectorService.migrateUser).toHaveBeenCalledWith(
organization.keyConnectorUrl,
userId,
);
expect(environmentService.setEnvironment).toHaveBeenCalledWith(Region.SelfHosted, {
keyConnector: organization.keyConnectorUrl,
} as Urls);

View File

@@ -64,7 +64,7 @@ export class ConvertToKeyConnectorCommand {
if (answer.convert === "remove") {
try {
await this.keyConnectorService.migrateUser(this.userId);
await this.keyConnectorService.migrateUser(organization.keyConnectorUrl, this.userId);
} catch (e) {
await this.logout();
throw e;