From 098161f2691b97760a1753ff88210df80d15c6b9 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Wed, 5 Feb 2025 10:59:42 +0100 Subject: [PATCH] Cleanup --- .../user-key-rotation.service.spec.ts | 17 +---------------- .../key-rotation/user-key-rotation.service.ts | 9 +-------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/apps/web/src/app/key-management/key-rotation/user-key-rotation.service.spec.ts b/apps/web/src/app/key-management/key-rotation/user-key-rotation.service.spec.ts index fba75723985..7a28c6acb79 100644 --- a/apps/web/src/app/key-management/key-rotation/user-key-rotation.service.spec.ts +++ b/apps/web/src/app/key-management/key-rotation/user-key-rotation.service.spec.ts @@ -4,11 +4,8 @@ import { mock, MockProxy } from "jest-mock-extended"; import { BehaviorSubject } from "rxjs"; import { OrganizationUserResetPasswordWithIdRequest } from "@bitwarden/admin-console/common"; -import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout.service"; import { DeviceTrustServiceAbstraction } from "@bitwarden/common/auth/abstractions/device-trust.service.abstraction"; -import { InternalMasterPasswordServiceAbstraction } from "@bitwarden/common/auth/abstractions/master-password.service.abstraction"; -import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction"; import { WebauthnRotateCredentialRequest } from "@bitwarden/common/auth/models/request/webauthn-rotate-credential.request"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; @@ -27,7 +24,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv import { CipherType } from "@bitwarden/common/vault/enums"; import { CipherWithIdRequest } from "@bitwarden/common/vault/models/request/cipher-with-id.request"; import { FolderWithIdRequest } from "@bitwarden/common/vault/models/request/folder-with-id.request"; -import { DialogService, ToastService } from "@bitwarden/components"; +import { ToastService } from "@bitwarden/components"; import { DEFAULT_KDF_CONFIG, KeyService } from "@bitwarden/key-management"; import { OrganizationUserResetPasswordService } from "../../admin-console/organizations/members/services/organization-user-reset-password/organization-user-reset-password.service"; @@ -56,12 +53,8 @@ describe("KeyRotationService", () => { let mockWebauthnLoginAdminService: MockProxy; let mockLogService: MockProxy; let mockVaultTimeoutService: MockProxy; - let mockeDialogService: MockProxy; - let mockFullApiService: MockProxy; - let mockTokenService: MockProxy; let mockToastService: MockProxy; let mockI18nService: MockProxy; - let mockInternalMasterPasswordService: MockProxy; const mockUser = { id: "mockUserId" as UserId, @@ -86,12 +79,8 @@ describe("KeyRotationService", () => { mockWebauthnLoginAdminService = mock(); mockLogService = mock(); mockVaultTimeoutService = mock(); - mockeDialogService = mock(); - mockFullApiService = mock(); - mockTokenService = mock(); mockToastService = mock(); mockI18nService = mock(); - mockInternalMasterPasswordService = mock(); keyRotationService = new UserKeyRotationService( mockUserVerificationService, @@ -108,12 +97,8 @@ describe("KeyRotationService", () => { mockWebauthnLoginAdminService, mockLogService, mockVaultTimeoutService, - mockeDialogService, - mockFullApiService, - mockTokenService, mockToastService, mockI18nService, - mockInternalMasterPasswordService, ); }); diff --git a/apps/web/src/app/key-management/key-rotation/user-key-rotation.service.ts b/apps/web/src/app/key-management/key-rotation/user-key-rotation.service.ts index 209265c767c..c762f896657 100644 --- a/apps/web/src/app/key-management/key-rotation/user-key-rotation.service.ts +++ b/apps/web/src/app/key-management/key-rotation/user-key-rotation.service.ts @@ -3,12 +3,9 @@ import { Injectable } from "@angular/core"; import { firstValueFrom } from "rxjs"; -import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { VaultTimeoutService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout.service"; import { Account } from "@bitwarden/common/auth/abstractions/account.service"; import { DeviceTrustServiceAbstraction } from "@bitwarden/common/auth/abstractions/device-trust.service.abstraction"; -import { InternalMasterPasswordServiceAbstraction } from "@bitwarden/common/auth/abstractions/master-password.service.abstraction"; -import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction"; import { VerificationType } from "@bitwarden/common/auth/enums/verification-type"; import { MasterPasswordVerification } from "@bitwarden/common/auth/types/verification"; @@ -24,7 +21,7 @@ import { UserKey } from "@bitwarden/common/types/key"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { FolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; -import { DialogService, ToastService } from "@bitwarden/components"; +import { ToastService } from "@bitwarden/components"; import { KeyService } from "@bitwarden/key-management"; import { OrganizationUserResetPasswordService } from "../../admin-console/organizations/members/services/organization-user-reset-password/organization-user-reset-password.service"; @@ -56,12 +53,8 @@ export class UserKeyRotationService { private webauthnLoginAdminService: WebauthnLoginAdminService, private logService: LogService, private vaultTimeoutService: VaultTimeoutService, - private dialogService: DialogService, - private fullApiService: ApiService, - private tokenService: TokenService, private toastService: ToastService, private i18nService: I18nService, - private masterPasswordService: InternalMasterPasswordServiceAbstraction, ) {} /**