Scheduling infrastructure for absolutely everyone.
chore: check IS_SELF_HOSTED in download (#7214)
Udit Takkarc51150350a01
diff --git a/apps/web/pages/api/download-cal-video-recording.ts b/apps/web/pages/api/download-cal-video-recording.tsindex f912e4d1e93..7b692c97782 100644--- a/apps/web/pages/api/download-cal-video-recording.ts+++ b/apps/web/pages/api/download-cal-video-recording.ts@@ -3,6 +3,7 @@ import { z } from "zod";import { fetcher } from "@calcom/app-store/dailyvideo/lib/VideoApiAdapter";import { getSession } from "@calcom/lib/auth";+import { IS_SELF_HOSTED } from "@calcom/lib/constants";import { defaultHandler, defaultResponder } from "@calcom/lib/server";const getAccessLinkSchema = z.union([@@ -25,7 +26,8 @@ async function handler(const session = await getSession({ req });// Check if user belong to active team- if (!session?.user?.belongsToActiveTeam) {+ const isDownloadAllowed = IS_SELF_HOSTED ? true : !session?.user?.belongsToActiveTeam;+ if (!isDownloadAllowed) {return res.status(403);}try {