Chore: Remove all noPersonalEmails related logic (#4726)

This commit is contained in:
Mike
2025-05-13 14:42:08 +02:00
committed by GitHub
parent 484f772689
commit a8ad4eeba0
7 changed files with 2 additions and 38 deletions
@@ -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<boolean>('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)
@@ -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 }
@@ -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
}
@@ -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 }}
@@ -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
@@ -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.",
-2
View File
@@ -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)