2020-12-22 16:57:44 +01:00
|
|
|
import { Component } from "@angular/core";
|
|
|
|
|
2021-06-07 20:13:58 +02:00
|
|
|
import { AuditService } from "jslib-common/abstractions/audit.service";
|
|
|
|
import { CipherService } from "jslib-common/abstractions/cipher.service";
|
|
|
|
import { CollectionService } from "jslib-common/abstractions/collection.service";
|
|
|
|
import { EventService } from "jslib-common/abstractions/event.service";
|
|
|
|
import { FolderService } from "jslib-common/abstractions/folder.service";
|
|
|
|
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
2021-10-20 18:30:04 +02:00
|
|
|
import { LogService } from "jslib-common/abstractions/log.service";
|
2021-06-07 20:13:58 +02:00
|
|
|
import { MessagingService } from "jslib-common/abstractions/messaging.service";
|
2021-12-14 17:10:26 +01:00
|
|
|
import { OrganizationService } from "jslib-common/abstractions/organization.service";
|
2021-06-07 20:13:58 +02:00
|
|
|
import { PasswordGenerationService } from "jslib-common/abstractions/passwordGeneration.service";
|
2021-11-09 19:24:26 +01:00
|
|
|
import { PasswordRepromptService } from "jslib-common/abstractions/passwordReprompt.service";
|
2021-06-07 20:13:58 +02:00
|
|
|
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
|
|
|
import { PolicyService } from "jslib-common/abstractions/policy.service";
|
|
|
|
import { StateService } from "jslib-common/abstractions/state.service";
|
|
|
|
import { TotpService } from "jslib-common/abstractions/totp.service";
|
|
|
|
import { Cipher } from "jslib-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);
|
|
|
|
}
|
|
|
|
}
|