From a95eaeb6f5c3cd7152c768ea09a9c8c9aa70f5fb Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Tue, 26 Nov 2024 14:00:18 -0800 Subject: [PATCH] Fix missing i18n and block ssh key creation in web (#12082) --- .../app/vault/individual-vault/add-edit-v2.component.ts | 2 ++ .../src/app/vault/individual-vault/add-edit.component.ts | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/apps/web/src/app/vault/individual-vault/add-edit-v2.component.ts b/apps/web/src/app/vault/individual-vault/add-edit-v2.component.ts index 85faac0c08..527f00d58f 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit-v2.component.ts +++ b/apps/web/src/app/vault/individual-vault/add-edit-v2.component.ts @@ -130,6 +130,8 @@ export class AddEditComponentV2 implements OnInit { return this.i18nService.t(partOne, this.i18nService.t("typeIdentity").toLowerCase()); case CipherType.SecureNote: return this.i18nService.t(partOne, this.i18nService.t("note").toLowerCase()); + case CipherType.SshKey: + return this.i18nService.t(partOne, this.i18nService.t("typeSshKey").toLowerCase()); } } diff --git a/apps/web/src/app/vault/individual-vault/add-edit.component.ts b/apps/web/src/app/vault/individual-vault/add-edit.component.ts index b4bd42a389..8f8c477951 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit.component.ts +++ b/apps/web/src/app/vault/individual-vault/add-edit.component.ts @@ -100,6 +100,14 @@ export class AddEditComponent extends BaseAddEditComponent implements OnInit, On async ngOnInit() { await super.ngOnInit(); await this.load(); + + // https://bitwarden.atlassian.net/browse/PM-10413 + // cannot generate ssh keys so block creation + if (this.type === CipherType.SshKey && this.cipherId == null) { + this.type = CipherType.Login; + this.cipher.type = CipherType.Login; + } + this.viewOnly = !this.cipher.edit && this.editMode; // remove when all the title for all clients are updated to New Item if (this.cloneMode || !this.editMode) {