diff --git a/ui/Dockerfile b/ui/Dockerfile index 4abfe1911a..932e889e91 100644 --- a/ui/Dockerfile +++ b/ui/Dockerfile @@ -81,8 +81,8 @@ ENV HOSTNAME="0.0.0.0" # - optional: UI_API_DOCS_URL # - optional: UI_CLOUD_ENABLED ("true" only in Prowler Cloud deployments) # - gated integrations (load only when *_ENABLED="true"; the value is then -# required or boot fails). Legacy names (NEXT_PUBLIC_*, POSTHOG_KEY/HOST) -# still activate without the flag: +# required or boot fails). Their legacy names (NEXT_PUBLIC_SENTRY_*, +# NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID, POSTHOG_KEY/HOST) still work: # UI_SENTRY_ENABLED + UI_SENTRY_DSN (+ optional UI_SENTRY_ENVIRONMENT) # UI_GOOGLE_TAG_MANAGER_ENABLED + UI_GOOGLE_TAG_MANAGER_ID # UI_POSTHOG_ENABLED + UI_POSTHOG_KEY + UI_POSTHOG_HOST (no consumer yet) diff --git a/ui/types/authFormSchema.ts b/ui/types/authFormSchema.ts index 83ee654188..1d2c1074f9 100644 --- a/ui/types/authFormSchema.ts +++ b/ui/types/authFormSchema.ts @@ -105,11 +105,12 @@ export const signUpSchema = baseAuthSchema }), company: z.string().optional(), invitationToken: z.string().optional(), - termsAndConditions: isCloud() - ? z.boolean().refine((value) => value === true, { - message: "You must accept the terms and conditions.", - }) - : z.boolean().optional(), + termsAndConditions: z + .boolean() + .optional() + .refine((value) => !isCloud() || value === true, { + error: "You must accept the terms and conditions.", + }), }) .refine( (data) => {