Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
Revert "⚖️ Link privacy policy, terms and cookie policy from the cloud app (#3551)"
Luke Vella87c96e80efa2
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex 937fdbf8a..977424c86 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -216,7 +216,6 @@"continueToCheckout": "Continue to checkout","continueWithEmail": "Continue with email","controlPanel": "Control Panel",- "cookiePolicy": "Cookie policy","copied": "Copied","copiedToClipboard": "Copied to clipboard","copy": "Copy",@@ -875,7 +874,6 @@"primaryColorDark": "Primary color (dark mode)","primaryColorSettingHint": "Used for buttons and highlights.","primaryColorSettingTitle": "Primary color",- "privacyPolicy": "Privacy policy","profile": "Profile","profileAccount": "Account","profileDescription": "Change your profile settings",@@ -1087,7 +1085,6 @@"teamCollaborationDescription": "Invite team members with centralized billing","teamCollaborationSettingDescription": "Allow all members of this space to see and manage each other's polls, events and other content.","temporaryEmailNotAllowed": "Temporary or disposable email addresses are not allowed.",- "termsOfUse": "Terms of use","theme": "Theme","themeDark": "Dark","themeDescription": "Choose your preferred appearance",diff --git a/apps/web/src/app/[locale]/control-panel/settings/actions.ts b/apps/web/src/app/[locale]/control-panel/settings/actions.tsindex d687a9d7b..28d441b37 100644--- a/apps/web/src/app/[locale]/control-panel/settings/actions.ts+++ b/apps/web/src/app/[locale]/control-panel/settings/actions.ts@@ -8,8 +8,8 @@ import {footerLinksSchema,instanceSettingsSchema,} from "@/features/instance-settings/schema";+import { isSelfHosted } from "@/lib/constants";import { AppError } from "@/lib/errors/app-error";-import { isFeatureEnabled } from "@/lib/feature-flags/server";import { adminActionClient } from "@/lib/safe-action/server";export const updateInstanceSettingsAction = adminActionClient@@ -30,7 +30,7 @@ export const updateFooterLinksAction = adminActionClient// Cloud renders its own static links, so `loadFooterLinks` discards// whatever is stored. Without this, a cloud admin would save, see a// success toast, and reload into an empty form.- if (!isFeatureEnabled("customFooterLinks")) {+ if (!isSelfHosted) {throw new AppError({code: "FORBIDDEN",message: "Footer links are not available on this instance",diff --git a/apps/web/src/app/[locale]/control-panel/settings/page.tsx b/apps/web/src/app/[locale]/control-panel/settings/page.tsxindex fe4983ca4..b134791c2 100644--- a/apps/web/src/app/[locale]/control-panel/settings/page.tsx+++ b/apps/web/src/app/[locale]/control-panel/settings/page.tsx@@ -16,7 +16,7 @@ import {import { getInstanceSettings } from "@/features/instance-settings/data";import { loadFooterLinks } from "@/features/instance-settings/loaders";import { Trans } from "@/i18n/client";-import { isFeatureEnabled } from "@/lib/feature-flags/server";+import { isSelfHosted } from "@/lib/constants";import { FooterLinksField } from "./footer-links-field";import { InstanceSettingsForm } from "./instance-settings-form";@@ -69,7 +69,7 @@ export default async function InstanceSettingsPage() {<InstanceSettingsForm defaultValue={instanceSettings} /></PageSectionContent></PageSection>- {isFeatureEnabled("customFooterLinks") ? (+ {isSelfHosted ? (<PageSection variant="card"><PageSectionHeader><PageSectionTitle>diff --git a/apps/web/src/components/instance-footer-links.tsx b/apps/web/src/components/instance-footer-links.tsxindex 329e1e63f..939dc8556 100644--- a/apps/web/src/components/instance-footer-links.tsx+++ b/apps/web/src/components/instance-footer-links.tsx@@ -1,6 +1,12 @@/**- * Footer links carrying legal disclosures such as an Impressum or privacy- * policy. See `loadFooterLinks` for where they come from.+ * Footer links configured by a self-hosted instance administrator, typically+ * legal disclosures such as an Impressum or privacy policy.+ *+ * Labels are admin-typed and therefore not localised — the linked documents+ * are themselves single-language, so a German Datenschutzerklärung stays+ * labelled in German for an English-speaking visitor.+ *+ * Hrefs are validated on write and again on read (see instance-settings/data.ts).*/export function InstanceFooterLinks({links,diff --git a/apps/web/src/features/instance-settings/loaders.ts b/apps/web/src/features/instance-settings/loaders.tsindex e644082c0..220129bc0 100644--- a/apps/web/src/features/instance-settings/loaders.ts+++ b/apps/web/src/features/instance-settings/loaders.ts@@ -1,7 +1,7 @@import "server-only";import { cache } from "react";-import { getTranslation } from "@/i18n/server";+import { isSelfHosted } from "@/lib/constants";import { isFeatureEnabled } from "@/lib/feature-flags/server";import { getInstanceSettings } from "./data";import { getUpdateStatus } from "./service";@@ -24,31 +24,15 @@ export const loadUpdateStatus = cache(async () => {* Footer links for the login and invite page footers.** Deliberately not routed through the branding config: these carry legal- * disclosures (Impressum, privacy policy) that instances are required to make- * reachable, so they are not gated behind the white label add-on the way the- * rest of the branding settings are.+ * disclosures (Impressum, privacy policy) that self-hosted instances are+ * required to make reachable, so they are not gated behind the white label+ * add-on the way the rest of the branding settings are.*- * Cloud links Rallly's own policies, labelled per locale. Self-hosted serves- * whatever the operator configured, labels as typed.+ * Cloud has its own static links (RAL-1563) and never reads this column.*/export const loadFooterLinks = cache(async () => {- if (!isFeatureEnabled("customFooterLinks")) {- const { t } = await getTranslation();-- return [- {- label: t("privacyPolicy", { defaultValue: "Privacy policy" }),- href: "https://rallly.co/privacy-policy",- },- {- label: t("termsOfUse", { defaultValue: "Terms of use" }),- href: "https://rallly.co/terms-of-use",- },- {- label: t("cookiePolicy", { defaultValue: "Cookie policy" }),- href: "https://rallly.co/cookie-policy",- },- ];+ if (!isSelfHosted) {+ return [];}const { footerLinks } = await getInstanceSettings();diff --git a/apps/web/src/lib/feature-flags/config.ts b/apps/web/src/lib/feature-flags/config.tsindex ad5cdd4ee..ce3798057 100644--- a/apps/web/src/lib/feature-flags/config.ts+++ b/apps/web/src/lib/feature-flags/config.ts@@ -53,7 +53,4 @@ export const featureFlagConfig: FeatureFlagConfig = {// Caps open polls per organizer by tier. Billing only: the ladder sells// Pro, and without billing every space already has every paid feature.openPollLimit: isOpenPollLimitEnabled,- // Operators publish their own legal notices. Cloud links Rallly's policies- // from source so a wrong URL goes through review, not a database row.- customFooterLinks: isSelfHosted,};diff --git a/apps/web/src/lib/feature-flags/types.ts b/apps/web/src/lib/feature-flags/types.tsindex 1630c44d0..23fec3d3e 100644--- a/apps/web/src/lib/feature-flags/types.ts+++ b/apps/web/src/lib/feature-flags/types.ts@@ -16,7 +16,6 @@ export interface FeatureFlagConfig {updateCheck: boolean;reviewRequests: boolean;openPollLimit: boolean;- customFooterLinks: boolean;}export type Feature = keyof FeatureFlagConfig;