1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-23 16:13:21 +00:00

Updates to remove the userVerificationPromptService

This commit is contained in:
CarleyDiaz-Bitwarden
2022-06-27 10:52:55 -04:00
parent ee120a0171
commit 20c556890c
10 changed files with 43 additions and 53 deletions

View File

@@ -3,7 +3,7 @@ import { EventView } from "../models/view/eventView";
export type ExportFormat = "csv" | "json" | "encrypted_json";
export abstract class ExportService {
getExport: (format?: ExportFormat, organizationId?: string, password?: string) => Promise<string>;
getExport: (format?: ExportFormat, organizationId?: string) => Promise<string>;
getPasswordProtectedExport: (password: string, organizationId?: string) => Promise<string>;
getOrganizationExport: (organizationId: string, format?: ExportFormat) => Promise<string>;
getEventExport: (events: EventView[]) => Promise<string>;

View File

@@ -1,9 +0,0 @@
export abstract class UserVerificationPromptService {
protectedFields: () => string[];
showUserVerificationPrompt: (
confirmDescription?: string,
confirmButtonText?: string,
modalTitle?: string
) => Promise<boolean>;
enabled: () => Promise<boolean>;
}

View File

@@ -36,19 +36,13 @@ export class ExportService implements ExportServiceAbstraction {
private cryptoFunctionService: CryptoFunctionService
) {}
async getExport(
format: ExportFormat = "csv",
organizationId?: string,
password?: string
): Promise<string> {
async getExport(format: ExportFormat = "csv", organizationId?: string): Promise<string> {
if (organizationId) {
return await this.getOrganizationExport(organizationId, format);
}
if (format === "encrypted_json") {
return password == undefined || password == ""
? this.getEncryptedExport()
: this.getPasswordProtectedExport(password);
return this.getEncryptedExport();
} else {
return this.getDecryptedExport(format);
}