From 239556b55f666ff887c7b2bc1d418e852b5434f7 Mon Sep 17 00:00:00 2001 From: Maciej Zieniuk <167752252+mzieniukbw@users.noreply.github.com> Date: Mon, 19 May 2025 14:58:51 +0200 Subject: [PATCH] [PM-18017] Show key connector domain in remove password page (#14695) * Passed in userId on RemovePasswordComponent. * Added userId on other references to KeyConnectorService methods * remove password component refactor, test coverage, enabled strict * explicit user id provided to key connector service * redirect to / instead when user not logged in or not managing organization * key connector service explicit user id * key connector service no longer requires account service * key connector service missing null type * cli convert to key connector unit tests * remove unnecessary SyncService * error toast not showing on ErrorResponse * bad import due to merge conflict * bad import due to merge conflict * missing loading in remove password component for browser extension * error handling in remove password component * organization observable race condition in key-connector * usesKeyConnector always returns boolean * unit test coverage * key connector reactive * reactive key connector service * introducing convertAccountRequired$ * cli build fix * moving message sending side effect to sync * key connector service unit tests * fix unit tests * move key connector components to KM team ownership * new unit tests in wrong place * key connector domain shown in remove password component * type safety improvements * convert to key connector command localization * key connector domain in convert to key connector command * convert to key connector command unit tests with prompt assert * organization name placement change in the remove password component * unit test update * key connector url required to be provided when migrating user * unit tests in wrong place after KM code ownership move * infinite page reload * failing unit tests * failing unit tests --------- Co-authored-by: Todd Martin --- apps/browser/src/_locales/en/messages.json | 16 +-- .../remove-password.component.html | 6 +- apps/cli/src/auth/commands/unlock.command.ts | 3 + apps/cli/src/base-program.ts | 1 + .../convert-to-key-connector.command.spec.ts | 76 ++++++++++++- .../convert-to-key-connector.command.ts | 23 ++-- apps/cli/src/locales/en/messages.json | 28 +++++ apps/cli/src/oss-serve-configurator.ts | 1 + apps/cli/src/program.ts | 1 + .../remove-password.component.html | 6 +- apps/desktop/src/locales/en/messages.json | 16 +-- .../remove-password.component.html | 6 +- apps/web/src/locales/en/messages.json | 13 +-- .../abstractions/key-connector.service.ts | 4 +- .../services/key-connector.service.spec.ts | 106 ++++-------------- .../services/key-connector.service.ts | 14 +-- .../remove-password.component.spec.ts | 16 ++- .../remove-password.component.ts | 5 +- 18 files changed, 201 insertions(+), 140 deletions(-) diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index f436c45ab7..3a5583f546 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -3014,14 +3014,14 @@ "copyCustomFieldNameNotUnique": { "message": "No unique identifier found." }, - "convertOrganizationEncryptionDesc": { - "message": "$ORGANIZATION$ is using SSO with a self-hosted key server. A master password is no longer required to log in for members of this organization.", - "placeholders": { - "organization": { - "content": "$1", - "example": "My Org Name" - } - } + "removeMasterPasswordForOrganizationUserKeyConnector": { + "message": "A master password is no longer required for members of the following organization. Please confirm the domain below with your organization administrator." + }, + "organizationName": { + "message": "Organization name" + }, + "keyConnectorDomain": { + "message": "Key Connector domain" }, "leaveOrganization": { "message": "Leave organization" diff --git a/apps/browser/src/key-management/key-connector/remove-password.component.html b/apps/browser/src/key-management/key-connector/remove-password.component.html index 272f727a7b..56baf0de2a 100644 --- a/apps/browser/src/key-management/key-connector/remove-password.component.html +++ b/apps/browser/src/key-management/key-connector/remove-password.component.html @@ -15,7 +15,11 @@
-

{{ "convertOrganizationEncryptionDesc" | i18n: organization.name }}

+

{{ "removeMasterPasswordForOrganizationUserKeyConnector" | i18n }}

+

{{ "organizationName" | i18n }}:

+

{{ organization.name }}

+

{{ "keyConnectorDomain" | i18n }}:

+

{{ organization.keyConnectorUrl }}

-

{{ "convertOrganizationEncryptionDesc" | i18n: organization.name }}

+

{{ "removeMasterPasswordForOrganizationUserKeyConnector" | i18n }}

+

{{ "organizationName" | i18n }}:

+

{{ organization.name }}

+

{{ "keyConnectorDomain" | i18n }}:

+

{{ organization.keyConnectorUrl }}