From 31e9ab24ef9657330018d0777eb2a9106cb850e0 Mon Sep 17 00:00:00 2001 From: Brandon Treston Date: Wed, 5 Feb 2025 12:12:51 -0500 Subject: [PATCH 1/4] add new copy, remove old (#13224) --- .../collection-dialog/collection-dialog.component.html | 4 ++-- apps/web/src/locales/en/messages.json | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.html b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.html index fbe0649c7aa..61fc290f6fe 100644 --- a/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.html +++ b/apps/web/src/app/vault/components/collection-dialog/collection-dialog.component.html @@ -70,11 +70,11 @@ - {{ "grantAddAccessCollectionWarning" | i18n }} + {{ "grantManageCollectionWarning" | i18n }} {{ "grantCollectionAccess" | i18n }} {{ diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index ef199163239..bb6fd62755a 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -8792,11 +8792,11 @@ "readOnlyCollectionAccess": { "message": "You do not have access to manage this collection." }, - "grantAddAccessCollectionWarningTitle": { - "message": "Missing Can Manage Permissions" + "grantManageCollectionWarningTitle": { + "message": "Missing Manage Collection Permissions" }, - "grantAddAccessCollectionWarning": { - "message": "Grant Can manage permissions to allow full collection management including deletion of collection." + "grantManageCollectionWarning": { + "message": "Grant Manage collection permissions to allow full collection management including deletion of collection." }, "grantCollectionAccess": { "message": "Grant groups or members access to this collection." From 605a5fd14b1406a60fa266b05d416283d2b9e260 Mon Sep 17 00:00:00 2001 From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com> Date: Wed, 5 Feb 2025 11:15:01 -0800 Subject: [PATCH 2/4] [PM-18023] - fix cipher form story (#13274) * fix cipher form story * re-add restricted import for now --- .../src/cipher-form/cipher-form.stories.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/libs/vault/src/cipher-form/cipher-form.stories.ts b/libs/vault/src/cipher-form/cipher-form.stories.ts index ff6401d62a5..1af73b5a8b8 100644 --- a/libs/vault/src/cipher-form/cipher-form.stories.ts +++ b/libs/vault/src/cipher-form/cipher-form.stories.ts @@ -1,8 +1,14 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore -import { signal } from "@angular/core"; +import { importProvidersFrom, signal } from "@angular/core"; import { action } from "@storybook/addon-actions"; -import { componentWrapperDecorator, Meta, moduleMetadata, StoryObj } from "@storybook/angular"; +import { + applicationConfig, + componentWrapperDecorator, + Meta, + moduleMetadata, + StoryObj, +} from "@storybook/angular"; import { BehaviorSubject } from "rxjs"; import { CollectionView } from "@bitwarden/admin-console/common"; @@ -16,7 +22,6 @@ import { DomainSettingsService } from "@bitwarden/common/autofill/services/domai import { ClientType } from "@bitwarden/common/enums"; import { UriMatchStrategy } from "@bitwarden/common/models/domain/domain-service"; import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { CipherType } from "@bitwarden/common/vault/enums"; import { Cipher } from "@bitwarden/common/vault/models/domain/cipher"; @@ -29,6 +34,10 @@ import { CipherFormGenerationService, PasswordRepromptService, } from "@bitwarden/vault"; +// FIXME: remove `/apps` import from `/libs` +// FIXME: remove `src` and fix import +// eslint-disable-next-line import/no-restricted-paths, no-restricted-imports +import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/src/app/core/tests"; import { CipherFormService } from "./abstractions/cipher-form.service"; import { TotpCaptureService } from "./abstractions/totp-capture.service"; @@ -207,12 +216,14 @@ export default { getFeatureFlag: () => Promise.resolve(false), }, }, - { provide: I18nService, useValue: { t: (...keys: string[]) => keys.join(" ") } }, ], }), componentWrapperDecorator( (story) => `
${story}
`, ), + applicationConfig({ + providers: [importProvidersFrom(PreloadedEnglishI18nModule)], + }), ], args: { config: defaultConfig, From dd971308b943d398666bda7c32253ec205bd8480 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 7 Feb 2025 11:50:19 +0100 Subject: [PATCH 3/4] Update libs/key-management/src/key.service.spec.ts Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> --- libs/key-management/src/key.service.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/key-management/src/key.service.spec.ts b/libs/key-management/src/key.service.spec.ts index 9dd415bee16..38c6afef8d3 100644 --- a/libs/key-management/src/key.service.spec.ts +++ b/libs/key-management/src/key.service.spec.ts @@ -851,7 +851,7 @@ describe("keyService", () => { return [fakeUserKey, fakeMasterKey]; } - it("returns null private key is null", async () => { + it("returns null when private key is null", async () => { setupKeys({ makeMasterKey: false, makeUserKey: false }); keyService.userPrivateKey$ = jest.fn().mockReturnValue(new BehaviorSubject(null)); From 11f636de51caf332b72187f2e42037dfb2f7097f Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Fri, 7 Feb 2025 11:52:10 +0100 Subject: [PATCH 4/4] Update apps/web/src/app/auth/settings/change-password.component.ts Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> --- apps/web/src/app/auth/settings/change-password.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/app/auth/settings/change-password.component.ts b/apps/web/src/app/auth/settings/change-password.component.ts index ee1232010aa..9f04190fcc4 100644 --- a/apps/web/src/app/auth/settings/change-password.component.ts +++ b/apps/web/src/app/auth/settings/change-password.component.ts @@ -156,7 +156,7 @@ export class ChangePasswordComponent title: this.i18nService.t("errorOccurred"), message: this.i18nService.t("masterPasswordRequired"), }); - return false; + return; } this.loading = true;