diff --git a/apps/browser/src/popup/app-routing.module.ts b/apps/browser/src/popup/app-routing.module.ts index 1e4e28ea6d0..0bf26f8c070 100644 --- a/apps/browser/src/popup/app-routing.module.ts +++ b/apps/browser/src/popup/app-routing.module.ts @@ -422,8 +422,12 @@ const routes: Routes = [ path: "hint", canActivate: [unauthGuardFn(unauthRouteOverrides)], data: { - pageTitle: "requestPasswordHint", - pageSubtitle: "enterYourAccountEmailAddressAndYourPasswordHintWillBeSentToYou", + pageTitle: { + key: "requestPasswordHint", + }, + pageSubtitle: { + key: "enterYourAccountEmailAddressAndYourPasswordHintWillBeSentToYou", + }, pageIcon: UserLockIcon, showBackButton: true, state: "hint", diff --git a/apps/web/src/app/admin-console/organizations/policies/require-sso.component.ts b/apps/web/src/app/admin-console/organizations/policies/require-sso.component.ts index c969343670f..80335eb5d81 100644 --- a/apps/web/src/app/admin-console/organizations/policies/require-sso.component.ts +++ b/apps/web/src/app/admin-console/organizations/policies/require-sso.component.ts @@ -3,6 +3,8 @@ import { Component } from "@angular/core"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { PolicyRequest } from "@bitwarden/common/admin-console/models/request/policy.request"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BasePolicy, BasePolicyComponent } from "./base-policy.component"; @@ -23,11 +25,19 @@ export class RequireSsoPolicy extends BasePolicy { templateUrl: "require-sso.component.html", }) export class RequireSsoPolicyComponent extends BasePolicyComponent { - constructor(private i18nService: I18nService) { + constructor( + private i18nService: I18nService, + private configService: ConfigService, + ) { super(); } - buildRequest(policiesEnabledMap: Map): Promise { + async buildRequest(policiesEnabledMap: Map): Promise { + if (await this.configService.getFeatureFlag(FeatureFlag.Pm13322AddPolicyDefinitions)) { + // We are now relying on server-side validation only + return super.buildRequest(policiesEnabledMap); + } + const singleOrgEnabled = policiesEnabledMap.get(PolicyType.SingleOrg) ?? false; if (this.enabled.value && !singleOrgEnabled) { throw new Error(this.i18nService.t("requireSsoPolicyReqError")); diff --git a/apps/web/src/app/admin-console/organizations/policies/single-org.component.ts b/apps/web/src/app/admin-console/organizations/policies/single-org.component.ts index c0a1413aa06..9899c4b9193 100644 --- a/apps/web/src/app/admin-console/organizations/policies/single-org.component.ts +++ b/apps/web/src/app/admin-console/organizations/policies/single-org.component.ts @@ -2,6 +2,8 @@ import { Component } from "@angular/core"; import { PolicyType } from "@bitwarden/common/admin-console/enums"; import { PolicyRequest } from "@bitwarden/common/admin-console/models/request/policy.request"; +import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; +import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { BasePolicy, BasePolicyComponent } from "./base-policy.component"; @@ -18,11 +20,19 @@ export class SingleOrgPolicy extends BasePolicy { templateUrl: "single-org.component.html", }) export class SingleOrgPolicyComponent extends BasePolicyComponent { - constructor(private i18nService: I18nService) { + constructor( + private i18nService: I18nService, + private configService: ConfigService, + ) { super(); } - buildRequest(policiesEnabledMap: Map): Promise { + async buildRequest(policiesEnabledMap: Map): Promise { + if (await this.configService.getFeatureFlag(FeatureFlag.Pm13322AddPolicyDefinitions)) { + // We are now relying on server-side validation only + return super.buildRequest(policiesEnabledMap); + } + if (!this.enabled.value) { if (policiesEnabledMap.get(PolicyType.RequireSso) ?? false) { throw new Error( diff --git a/apps/web/src/app/oss-routing.module.ts b/apps/web/src/app/oss-routing.module.ts index e7ae154ec4e..fa4da88ce7d 100644 --- a/apps/web/src/app/oss-routing.module.ts +++ b/apps/web/src/app/oss-routing.module.ts @@ -184,7 +184,9 @@ const routes: Routes = [ path: "hint", canActivate: [unauthGuardFn()], data: { - pageTitle: "passwordHint", + pageTitle: { + key: "passwordHint", + }, titleId: "passwordHint", }, children: [ @@ -203,8 +205,12 @@ const routes: Routes = [ path: "hint", canActivate: [unauthGuardFn()], data: { - pageTitle: "requestPasswordHint", - pageSubtitle: "enterYourAccountEmailAddressAndYourPasswordHintWillBeSentToYou", + pageTitle: { + key: "requestPasswordHint", + }, + pageSubtitle: { + key: "enterYourAccountEmailAddressAndYourPasswordHintWillBeSentToYou", + }, pageIcon: UserLockIcon, state: "hint", }, diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 5c876e0a8a4..96e987a7f64 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -9377,6 +9377,21 @@ "editAccess": { "message": "Edit access" }, + "textHelpText": { + "message": "Use text fields for data like security questions" + }, + "hiddenHelpText": { + "message": "Use hidden fields for sensitive data like a password" + }, + "checkBoxHelpText": { + "message": "Use checkboxes if you'd like to autofill a form's checkbox, like a remember email" + }, + "linkedHelpText": { + "message": "Use a linked field when you are experiencing autofill issues for a specific website." + }, + "linkedLabelHelpText": { + "message": "Enter the the field's html id, name, aria-label, or placeholder." + }, "uppercaseDescription": { "message": "Include uppercase characters", "description": "Tooltip for the password generator uppercase character checkbox" diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts index e0b76c7f5c3..7141f867882 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-add-edit-dialog/domain-add-edit-dialog.component.ts @@ -105,6 +105,11 @@ export class DomainAddEditDialogComponent implements OnInit, OnDestroy { copyDnsTxt(): void { this.orgDomainService.copyDnsTxt(this.txtCtrl.value); + this.toastService.showToast({ + variant: "success", + title: null, + message: this.i18nService.t("valueCopied", this.i18nService.t("dnsTxtRecord")), + }); } // End Form methods diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts index bc68bdaaf54..703808900c9 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/domain-verification/domain-verification.component.ts @@ -101,6 +101,11 @@ export class DomainVerificationComponent implements OnInit, OnDestroy { copyDnsTxt(dnsTxt: string): void { this.orgDomainService.copyDnsTxt(dnsTxt); + this.toastService.showToast({ + variant: "success", + title: null, + message: this.i18nService.t("valueCopied", this.i18nService.t("dnsTxtRecord")), + }); } async verifyDomain(orgDomainId: string, domainName: string): Promise { diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/providers-routing.module.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/providers-routing.module.ts index 21fa863d2a9..aedb43fd8d0 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/providers-routing.module.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/providers-routing.module.ts @@ -62,7 +62,9 @@ const routes: Routes = [ path: "accept-provider", component: AcceptProviderComponent, data: { - pageTitle: "joinProvider", + pageTitle: { + key: "joinProvider", + }, titleId: "acceptProvider", }, }, diff --git a/libs/common/src/admin-console/services/organization-domain/org-domain.service.spec.ts b/libs/common/src/admin-console/services/organization-domain/org-domain.service.spec.ts index 6721ea3a808..21027334fb8 100644 --- a/libs/common/src/admin-console/services/organization-domain/org-domain.service.spec.ts +++ b/libs/common/src/admin-console/services/organization-domain/org-domain.service.spec.ts @@ -180,6 +180,5 @@ describe("Org Domain Service", () => { it("copyDnsTxt copies DNS TXT to clipboard and shows toast", () => { orgDomainService.copyDnsTxt("fakeTxt"); expect(jest.spyOn(platformUtilService, "copyToClipboard")).toHaveBeenCalled(); - expect(jest.spyOn(platformUtilService, "showToast")).toHaveBeenCalled(); }); }); diff --git a/libs/common/src/admin-console/services/organization-domain/org-domain.service.ts b/libs/common/src/admin-console/services/organization-domain/org-domain.service.ts index 5a5a2e4288f..ebdc098c855 100644 --- a/libs/common/src/admin-console/services/organization-domain/org-domain.service.ts +++ b/libs/common/src/admin-console/services/organization-domain/org-domain.service.ts @@ -23,11 +23,6 @@ export class OrgDomainService implements OrgDomainInternalServiceAbstraction { copyDnsTxt(dnsTxt: string): void { this.platformUtilsService.copyToClipboard(dnsTxt); - this.platformUtilsService.showToast( - "success", - null, - this.i18nService.t("valueCopied", this.i18nService.t("dnsTxtRecord")), - ); } upsert(orgDomains: OrganizationDomainResponse[]): void { diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index 45b02471f3c..d954f31c19f 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -35,6 +35,7 @@ export enum FeatureFlag { PM11901_RefactorSelfHostingLicenseUploader = "PM-11901-refactor-self-hosting-license-uploader", Pm3478RefactorOrganizationUserApi = "pm-3478-refactor-organizationuser-api", AccessIntelligence = "pm-13227-access-intelligence", + Pm13322AddPolicyDefinitions = "pm-13322-add-policy-definitions", } export type AllowedFeatureFlagTypes = boolean | number | string; @@ -80,6 +81,7 @@ export const DefaultFeatureFlagValue = { [FeatureFlag.PM11901_RefactorSelfHostingLicenseUploader]: FALSE, [FeatureFlag.Pm3478RefactorOrganizationUserApi]: FALSE, [FeatureFlag.AccessIntelligence]: FALSE, + [FeatureFlag.Pm13322AddPolicyDefinitions]: FALSE, } satisfies Record; export type DefaultFeatureFlagValueType = typeof DefaultFeatureFlagValue; diff --git a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html index cc1400f0a6c..bcda8b57107 100644 --- a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html +++ b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html @@ -43,8 +43,13 @@ > {{ "sendPasswordDescV2" | i18n }} - - + + {{ "hideYourEmail" | i18n }} diff --git a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.spec.ts b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.spec.ts index fdb306ff761..d259566cc57 100644 --- a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.spec.ts +++ b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.spec.ts @@ -58,6 +58,13 @@ describe("UriOptionComponent", () => { expect(component["uriMatchOptions"][0].label).toBe("default"); }); + it("should update the default uri match strategy label when it is domain", () => { + component.defaultMatchDetection = UriMatchStrategy.Domain; + fixture.detectChanges(); + + expect(component["uriMatchOptions"][0].label).toBe("defaultLabel baseDomain"); + }); + it("should update the default uri match strategy label", () => { component.defaultMatchDetection = UriMatchStrategy.Exact; fixture.detectChanges(); diff --git a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts index 82870befa12..4af80ed464c 100644 --- a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts +++ b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts @@ -84,7 +84,7 @@ export class UriOptionComponent implements ControlValueAccessor { @Input({ required: true }) set defaultMatchDetection(value: UriMatchStrategySetting) { // The default selection has a value of `null` avoid showing "Default (Default)" - if (!value) { + if (value === null) { return; }