Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server): Add force email verification feature flag #3866

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/shared/src/environment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ const parseFeatureFlags = () => {
FF_FILEIMPORT_IFC_DOTNET_ENABLED: {
schema: z.boolean(),
defaults: { production: false, _: false }
},
// Forces email verification for all users
FF_FORCE_EMAIL_VERIFICATION: {
schema: z.boolean(),
defaults: { production: false, _: false }
}
})

Expand All @@ -80,6 +85,7 @@ export function getFeatureFlags(): {
FF_BILLING_INTEGRATION_ENABLED: boolean
FF_WORKSPACES_MULTI_REGION_ENABLED: boolean
FF_FILEIMPORT_IFC_DOTNET_ENABLED: boolean
FF_FORCE_EMAIL_VERIFICATION: boolean
} {
if (!parsedFlags) parsedFlags = parseFeatureFlags()
return parsedFlags
Expand Down
3 changes: 3 additions & 0 deletions utils/helm/speckle-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,9 @@ Generate the environment variables for Speckle server and Speckle objects deploy
- name: FF_WORKSPACES_MULTI_REGION_ENABLED
value: {{ .Values.featureFlags.workspacesMultiRegionEnabled | quote }}

- name: FF_FORCE_EMAIL_VERIFICATION
value: {{ .Values.featureFlags.forceEmailVerification | quote }}

{{- if .Values.featureFlags.billingIntegrationEnabled }}
- name: STRIPE_API_KEY
valueFrom:
Expand Down
2 changes: 2 additions & 0 deletions utils/helm/speckle-server/templates/frontend_2/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ spec:
value: {{ .Values.featureFlags.workspacesMultiRegionEnabled | quote }}
- name: NUXT_PUBLIC_FF_GENDOAI_MODULE_ENABLED
value: {{ .Values.featureFlags.gendoAIModuleEnabled | quote }}
- name: NUXT_PUBLIC_FF_FORCE_EMAIL_VERIFICATION
value: {{ .Values.featureFlags.forceEmailVerification | quote }}
{{- if .Values.analytics.survicate_workspace_key }}
- name: NUXT_PUBLIC_SURVICATE_WORKSPACE_KEY
value: {{ .Values.analytics.survicate_workspace_key | quote }}
Expand Down
5 changes: 5 additions & 0 deletions utils/helm/speckle-server/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@
"type": "boolean",
"description": "Toggles whether the experimental .Net IFC importer is used for importing IFC files.",
"default": false
},
"forceEmailVerification": {
"type": "boolean",
"description": "Forces email verification for all users",
"default": false
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions utils/helm/speckle-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ featureFlags:
workspacesMultiRegionEnabled: false
## @param featureFlags.fileImportIFCDotNetEnabled Toggles whether the experimental .Net IFC importer is used for importing IFC files.
fileImportIFCDotNetEnabled: false
## @param featureFlags.forceEmailVerification Forces email verification for all users
forceEmailVerification: false

analytics:
## @param analytics.enabled Enable or disable analytics
Expand Down
Loading