From a8ad4eeba06604aa9d0b76db12fa6de713714075 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 13 May 2025 14:42:08 +0200 Subject: [PATCH] Chore: Remove all noPersonalEmails related logic (#4726) --- .../components/auth/RegisterWithEmailBlock.vue | 12 ++---------- packages/frontend-2/composables/globals.ts | 8 -------- packages/frontend-2/lib/auth/helpers/validation.ts | 8 -------- utils/helm/speckle-server/templates/_helpers.tpl | 3 --- .../templates/frontend_2/deployment.yml | 2 -- utils/helm/speckle-server/values.schema.json | 5 ----- utils/helm/speckle-server/values.yaml | 2 -- 7 files changed, 2 insertions(+), 38 deletions(-) diff --git a/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue b/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue index 96bc6bbd5..2a577f9d3 100644 --- a/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue +++ b/packages/frontend-2/components/auth/RegisterWithEmailBlock.vue @@ -69,10 +69,7 @@ import { ToastNotificationType, useGlobalToast } from '~~/lib/common/composables import { ensureError } from '@speckle/shared' import { useAuthManager } from '~~/lib/auth/composables/auth' import { loginRoute } from '~~/lib/common/helpers/route' -import { - passwordRules, - doesNotContainBlockedDomain -} from '~~/lib/auth/helpers/validation' +import { passwordRules } from '~~/lib/auth/helpers/validation' import { graphql } from '~~/lib/common/generated/gql' import type { ServerTermsOfServicePrivacyPolicyFragmentFragment } from '~~/lib/common/generated/gql/graphql' import { useMounted } from '@vueuse/core' @@ -96,18 +93,13 @@ const router = useRouter() const { signUpWithEmail, inviteToken } = useAuthManager() const { triggerNotification } = useGlobalToast() const isMounted = useMounted() -const isNoPersonalEmailsEnabled = useIsNoPersonalEmailsEnabled() const newsletterConsent = defineModel('newsletterConsent', { required: true }) const loading = ref(false) const password = ref('') const email = ref('') -const emailRules = computed(() => - inviteToken.value || !isNoPersonalEmailsEnabled.value - ? [isEmail] - : [isEmail, doesNotContainBlockedDomain] -) +const emailRules = [isEmail] const nameRules = [isRequired] const isEmailDisabled = computed(() => !!props.inviteEmail?.length || loading.value) diff --git a/packages/frontend-2/composables/globals.ts b/packages/frontend-2/composables/globals.ts index dae4abd04..e08033a86 100644 --- a/packages/frontend-2/composables/globals.ts +++ b/packages/frontend-2/composables/globals.ts @@ -68,12 +68,4 @@ export const useIsBillingIntegrationEnabled = () => { return ref(FF_BILLING_INTEGRATION_ENABLED) } -export const useIsNoPersonalEmailsEnabled = () => { - const { - public: { FF_NO_PERSONAL_EMAILS_ENABLED } - } = useRuntimeConfig() - - return ref(FF_NO_PERSONAL_EMAILS_ENABLED) -} - export { useGlobalToast, useActiveUser, usePageQueryStandardFetchPolicy } diff --git a/packages/frontend-2/lib/auth/helpers/validation.ts b/packages/frontend-2/lib/auth/helpers/validation.ts index 393aec621..9c877d077 100644 --- a/packages/frontend-2/lib/auth/helpers/validation.ts +++ b/packages/frontend-2/lib/auth/helpers/validation.ts @@ -1,5 +1,4 @@ import { isStringOfLength, stringContains } from '~~/lib/common/helpers/validation' -import { blockedDomains } from '@speckle/shared' export const passwordLongEnough = isStringOfLength({ minLength: 8 }) export const passwordHasAtLeastOneNumber = stringContains({ @@ -21,10 +20,3 @@ export const passwordRules = [ passwordHasAtLeastOneLowercaseLetter, passwordHasAtLeastOneUppercaseLetter ] - -export const doesNotContainBlockedDomain = (val: string) => { - const domain = val.split('@')[1]?.toLowerCase() - return domain && blockedDomains.includes(domain) - ? 'Please use your work email instead of a personal email address' - : true -} diff --git a/utils/helm/speckle-server/templates/_helpers.tpl b/utils/helm/speckle-server/templates/_helpers.tpl index cca60c5e1..526adea86 100644 --- a/utils/helm/speckle-server/templates/_helpers.tpl +++ b/utils/helm/speckle-server/templates/_helpers.tpl @@ -566,9 +566,6 @@ Generate the environment variables for Speckle server and Speckle objects deploy - name: FF_WORKSPACES_MODULE_ENABLED value: {{ .Values.featureFlags.workspacesModuleEnabled | quote }} -- name: FF_NO_PERSONAL_EMAILS_ENABLED - value: {{ .Values.featureFlags.noPersonalEmailsEnabled | quote }} - - name: FF_WORKSPACES_SSO_ENABLED value: {{ .Values.featureFlags.workspacesSSOEnabled | quote }} diff --git a/utils/helm/speckle-server/templates/frontend_2/deployment.yml b/utils/helm/speckle-server/templates/frontend_2/deployment.yml index 5406ea844..2cdcc6bec 100644 --- a/utils/helm/speckle-server/templates/frontend_2/deployment.yml +++ b/utils/helm/speckle-server/templates/frontend_2/deployment.yml @@ -141,8 +141,6 @@ spec: value: {{ .Values.featureFlags.gendoAIModuleEnabled | quote }} - name: NUXT_PUBLIC_FF_FORCE_ONBOARDING value: {{ .Values.featureFlags.forceOnboarding | quote }} - - name: NUXT_PUBLIC_FF_NO_PERSONAL_EMAILS_ENABLED - value: {{ .Values.featureFlags.noPersonalEmailsEnabled | quote }} - name: NUXT_PUBLIC_FF_WORKSPACES_NEW_PLANS_ENABLED value: {{ .Values.featureFlags.workspacesNewPlanEnabled | quote }} - name: NUXT_PUBLIC_FF_NEXT_GEN_FILE_IMPORTER_ENABLED diff --git a/utils/helm/speckle-server/values.schema.json b/utils/helm/speckle-server/values.schema.json index 4f7f3eb95..8950ae3e6 100644 --- a/utils/helm/speckle-server/values.schema.json +++ b/utils/helm/speckle-server/values.schema.json @@ -85,11 +85,6 @@ "description": "Forces onboarding for all users", "default": false }, - "noPersonalEmailsEnabled": { - "type": "boolean", - "description": "Disables the ability sign up with personal email addresses", - "default": false - }, "workspacesNewPlanEnabled": { "type": "boolean", "description": "Toggles whether the new (Q1 2025) plans for workspaces are available. workspacesModuleEnabled must also be enabled for this to take effect.", diff --git a/utils/helm/speckle-server/values.yaml b/utils/helm/speckle-server/values.yaml index 55e2f49eb..bc9594b54 100644 --- a/utils/helm/speckle-server/values.yaml +++ b/utils/helm/speckle-server/values.yaml @@ -55,8 +55,6 @@ featureFlags: forceEmailVerification: false ## @param featureFlags.forceOnboarding Forces onboarding for all users forceOnboarding: false - ## @param featureFlags.noPersonalEmailsEnabled Disables the ability sign up with personal email addresses - noPersonalEmailsEnabled: false ## @param featureFlags.workspacesNewPlanEnabled Toggles whether the new (Q1 2025) plans for workspaces are available. workspacesModuleEnabled must also be enabled for this to take effect. workspacesNewPlanEnabled: false ## @param featureFlags.moveProjectRegionEnabled Enables the ability to move a project region (manually or automatically)