mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 04:51:51 +00:00
fix(ui): apply CodeRabbit feedback on cloud env migration
- Evaluate isCloud() during sign-up validation instead of at module load, avoiding an island/bundle race; use Zod 4 error syntax - Scope Dockerfile env docs to the real integration legacy names, dropping the misleading NEXT_PUBLIC_* wildcard
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user