From 9bb83aba7eddf9c0bdcfd2d467eeb11dc89b02fa Mon Sep 17 00:00:00 2001 From: Peer Richelsen Date: Fri, 9 Dec 2022 12:05:42 +0100 Subject: [PATCH] removed license consent (#5931) Co-authored-by: alannnc Co-authored-by: Alex van Andel --- .env.example | 5 +- README.md | 2 +- app.json | 5 - .../ee/common/components/LicenseBanner.tsx | 96 ------------------- packages/lib/telemetry.ts | 1 - packages/types/environment.d.ts | 10 -- turbo.json | 1 - 7 files changed, 3 insertions(+), 117 deletions(-) delete mode 100644 packages/features/ee/common/components/LicenseBanner.tsx diff --git a/.env.example b/.env.example index 6cbeb377f0..07e9081000 100644 --- a/.env.example +++ b/.env.example @@ -7,14 +7,13 @@ # - E-MAIL SETTINGS # - LICENSE ************************************************************************************************* -# Set this value to 'agree' to accept our license: -# LICENSE: https://github.com/calendso/calendso/blob/main/LICENSE +# https://github.com/calendso/calendso/blob/main/LICENSE # # Summary of terms: # - The codebase has to stay open source, whether it was modified or not # - You can not repackage or sell the codebase # - Acquire a commercial license to remove these terms by visiting: cal.com/sales -NEXT_PUBLIC_LICENSE_CONSENT='' +# # To enable enterprise-only features, fill your license key in here. # @see https://console.cal.com CALCOM_LICENSE_KEY= diff --git a/README.md b/README.md index bb70623289..b73b14fd67 100644 --- a/README.md +++ b/README.md @@ -292,7 +292,7 @@ You can deploy Cal on [Railway](https://railway.app/) using the button above. Th Currently Vercel Pro Plan is required to be able to Deploy this application with Vercel, due to limitations on the number of serverless functions on the free plan. -[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com&env=DATABASE_URL,NEXT_PUBLIC_WEBAPP_URL,NEXTAUTH_URL,NEXTAUTH_SECRET,CRON_API_KEY,CALENDSO_ENCRYPTION_KEY,NEXT_PUBLIC_LICENSE_CONSENT&envDescription=See%20all%20available%20env%20vars&envLink=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com%2Fblob%2Fmain%2F.env.example&project-name=cal&repo-name=cal.com&build-command=cd%20../..%20%26%26%20yarn%20build&root-directory=apps%2Fweb%2F) +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com&env=DATABASE_URL,NEXT_PUBLIC_WEBAPP_URL,NEXTAUTH_URL,NEXTAUTH_SECRET,CRON_API_KEY,CALENDSO_ENCRYPTION_KEY&envDescription=See%20all%20available%20env%20vars&envLink=https%3A%2F%2Fgithub.com%2Fcalcom%2Fcal.com%2Fblob%2Fmain%2F.env.example&project-name=cal&repo-name=cal.com&build-command=cd%20../..%20%26%26%20yarn%20build&root-directory=apps%2Fweb%2F) diff --git a/app.json b/app.json index ba670bab19..7776063fee 100644 --- a/app.json +++ b/app.json @@ -33,11 +33,6 @@ "generator": "secret", "required": "true" }, - "NEXT_PUBLIC_LICENSE_CONSENT": { - "description": "License consent", - "value": "true", - "required": "true" - }, "CRON_API_KEY": { "description": "ApiKey for cronjobs", "value": "" diff --git a/packages/features/ee/common/components/LicenseBanner.tsx b/packages/features/ee/common/components/LicenseBanner.tsx deleted file mode 100644 index 0d1eae3e31..0000000000 --- a/packages/features/ee/common/components/LicenseBanner.tsx +++ /dev/null @@ -1,96 +0,0 @@ -import { Trans } from "react-i18next"; - -import { useLocale } from "@calcom/lib/hooks/useLocale"; -import { BadgeCheckIcon, ConfirmationDialogContent, Dialog, DialogTrigger, Icon } from "@calcom/ui"; - -export default function LicenseBanner() { - const { t } = useLocale(); - /* - Set this value to 'agree' to accept our license: - LICENSE: https://github.com/calcom/cal.com/blob/main/LICENSE - - Summary of terms: - - The codebase has to stay open source, whether it was modified or not - - You can not repackage or sell the codebase - - Acquire a commercial license to remove these terms by visiting: cal.com/sales - NEXT_PUBLIC_LICENSE_CONSENT='' - */ - if (process.env.NEXT_PUBLIC_LICENSE_CONSENT === "agree" || process.env.NEXT_PUBLIC_IS_E2E) { - return null; - } - - return ( -
-
-
-
-
- - -

- - - Accept our license by changing the .env variable - NEXT_PUBLIC_LICENSE_CONSENT to - 'agree'. - - -

-
-
- - - - - - -
-
- - - - - - -
-
-
-
-
- ); - - function DialogContent() { - return ( - - - To remove this banner, please open your .env file and change the - - NEXT_PUBLIC_LICENSE_CONSENT - - variable to 'agreeapos;. - -

{t("terms_summary")}:

-
    -
  • {t("codebase_has_to_stay_opensource")}
  • -
  • {t("cannot_repackage_codebase")}
  • -
  • - {t("acquire_license")}:{" "} - - cal.com/sales - -
  • -
-
- ); - } -} diff --git a/packages/lib/telemetry.ts b/packages/lib/telemetry.ts index 9519850239..6f42de6a9e 100644 --- a/packages/lib/telemetry.ts +++ b/packages/lib/telemetry.ts @@ -96,7 +96,6 @@ export const extendEventData = ( ipAddress: "", queryString: "", page_url: pageUrl, - licenseConsent: !!process.env.NEXT_PUBLIC_LICENSE_CONSENT, licensekey: process.env.CALCOM_LICENSE_KEY, isTeamBooking: original?.isTeamBooking === undefined diff --git a/packages/types/environment.d.ts b/packages/types/environment.d.ts index ba0a53c871..e398409c1f 100644 --- a/packages/types/environment.d.ts +++ b/packages/types/environment.d.ts @@ -1,15 +1,5 @@ declare namespace NodeJS { interface ProcessEnv { - /** - * Set this value to 'agree' to accept our license: - * LICENSE: https://github.com/calendso/calendso/blob/main/LICENSE - * - * Summary of terms: - * - The codebase has to stay open source, whether it was modified or not - * - You can not repackage or sell the codebase - * - Acquire a commercial license to remove these terms by visiting: cal.com/sales - **/ - readonly NEXT_PUBLIC_LICENSE_CONSENT: "agree" | undefined; /** Needed to enable enterprise-only features */ readonly CALCOM_LICENSE_KEY: string | undefined; readonly CALCOM_TELEMETRY_DISABLED: string | undefined; diff --git a/turbo.json b/turbo.json index b8bdfd152b..c380af8b8c 100644 --- a/turbo.json +++ b/turbo.json @@ -30,7 +30,6 @@ "dependsOn": [ "^build", "$NEXT_PUBLIC_IS_E2E", - "$NEXT_PUBLIC_LICENSE_CONSENT", "$NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE_MONTHLY", "$NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRODUCT_ID", "$NEXT_PUBLIC_STRIPE_TEAM_MONTHLY_PRICE_ID",