2020-12-22 16:57:44 +01:00
|
|
|
import { Component } from "@angular/core";
|
|
|
|
|
2022-06-14 17:10:53 +02:00
|
|
|
import { AuditService } from "@bitwarden/common/abstractions/audit.service";
|
|
|
|
import { CipherService } from "@bitwarden/common/abstractions/cipher.service";
|
|
|
|
import { CollectionService } from "@bitwarden/common/abstractions/collection.service";
|
|
|
|
import { EventService } from "@bitwarden/common/abstractions/event.service";
|
2022-07-08 15:40:31 +02:00
|
|
|
import { FolderService } from "@bitwarden/common/abstractions/folder/folder.service.abstraction";
|
2022-06-14 17:10:53 +02:00
|
|
|
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
|
|
|
|
import { LogService } from "@bitwarden/common/abstractions/log.service";
|
|
|
|
import { MessagingService } from "@bitwarden/common/abstractions/messaging.service";
|
2022-09-27 22:25:19 +02:00
|
|
|
import { OrganizationService } from "@bitwarden/common/abstractions/organization/organization.service.abstraction";
|
2022-06-14 17:10:53 +02:00
|
|
|
import { PasswordGenerationService } from "@bitwarden/common/abstractions/passwordGeneration.service";
|
|
|
|
import { PasswordRepromptService } from "@bitwarden/common/abstractions/passwordReprompt.service";
|
|
|
|
import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service";
|
2022-08-08 11:04:36 +02:00
|
|
|
import { PolicyService } from "@bitwarden/common/abstractions/policy/policy.service.abstraction";
|
2022-06-14 17:10:53 +02:00
|
|
|
import { StateService } from "@bitwarden/common/abstractions/state.service";
|
|
|
|
import { TotpService } from "@bitwarden/common/abstractions/totp.service";
|
|
|
|
import { Cipher } from "@bitwarden/common/models/domain/cipher";
|
2020-12-22 16:57:44 +01:00
|
|
|
|
|
|
|
import { AddEditComponent as BaseAddEditComponent } from "../vault/add-edit.component";
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: "app-org-vault-add-edit",
|
|
|
|
templateUrl: "../vault/add-edit.component.html",
|
|
|
|
})
|
|
|
|
export class EmergencyAddEditComponent extends BaseAddEditComponent {
|
|
|
|
originalCipher: Cipher = null;
|
|
|
|
viewOnly = true;
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
cipherService: CipherService,
|
|
|
|
folderService: FolderService,
|
|
|
|
i18nService: I18nService,
|
|
|
|
platformUtilsService: PlatformUtilsService,
|
2021-12-14 17:10:26 +01:00
|
|
|
auditService: AuditService,
|
|
|
|
stateService: StateService,
|
|
|
|
collectionService: CollectionService,
|
2020-12-22 16:57:44 +01:00
|
|
|
totpService: TotpService,
|
|
|
|
passwordGenerationService: PasswordGenerationService,
|
2021-12-14 17:10:26 +01:00
|
|
|
messagingService: MessagingService,
|
|
|
|
eventService: EventService,
|
|
|
|
policyService: PolicyService,
|
|
|
|
passwordRepromptService: PasswordRepromptService,
|
|
|
|
organizationService: OrganizationService,
|
|
|
|
logService: LogService
|
|
|
|
) {
|
2020-12-22 16:57:44 +01:00
|
|
|
super(
|
|
|
|
cipherService,
|
|
|
|
folderService,
|
|
|
|
i18nService,
|
|
|
|
platformUtilsService,
|
|
|
|
auditService,
|
|
|
|
stateService,
|
2021-12-14 17:10:26 +01:00
|
|
|
collectionService,
|
|
|
|
totpService,
|
|
|
|
passwordGenerationService,
|
|
|
|
messagingService,
|
|
|
|
eventService,
|
|
|
|
policyService,
|
|
|
|
organizationService,
|
|
|
|
logService,
|
|
|
|
passwordRepromptService
|
|
|
|
);
|
2020-12-22 16:57:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
async load() {
|
|
|
|
this.title = this.i18nService.t("viewItem");
|
|
|
|
}
|
|
|
|
|
|
|
|
protected async loadCipher() {
|
|
|
|
return Promise.resolve(this.originalCipher);
|
|
|
|
}
|
|
|
|
}
|