From d034e7aff78668192776a233457d3dba16b2a698 Mon Sep 17 00:00:00 2001 From: Eesh Midha <72607015+eeshm@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:34:30 +0530 Subject: [PATCH] fix: enforce team-only access on premium toggles in cal video (#25680) (#25681) * fix(cal-video): enforce team-only access on premium toggles * fix(cal-video): disable redirect URL field and add upgrade badge for non-team users * chore: improvments --------- Co-authored-by: Udit Takkar --- .../eventtypes/components/locations/CalVideoSettings.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/features/eventtypes/components/locations/CalVideoSettings.tsx b/packages/features/eventtypes/components/locations/CalVideoSettings.tsx index 49d01b0fb5..a7acb11f62 100644 --- a/packages/features/eventtypes/components/locations/CalVideoSettings.tsx +++ b/packages/features/eventtypes/components/locations/CalVideoSettings.tsx @@ -4,6 +4,7 @@ import { useState } from "react"; import { useFormContext, Controller } from "react-hook-form"; import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform"; +import { useHasTeamPlan } from "@calcom/features/billing/hooks/useHasPaidPlan"; import type { FormValues } from "@calcom/features/eventtypes/lib/types"; import type { CalVideoSettings as CalVideoSettingsType } from "@calcom/features/eventtypes/lib/types"; import { useLocale } from "@calcom/lib/hooks/useLocale"; @@ -22,6 +23,7 @@ const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings?: CalVideoSet const isPlatform = useIsPlatform(); const [isExpanded, setIsExpanded] = useState(false); const [parent] = useAutoAnimate(); + const { hasTeamPlan } = useHasTeamPlan(); return ( <> @@ -51,6 +53,7 @@ const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings?: CalVideoSet title={t("disable_recording_for_guests")} labelClassName="text-sm leading-6 whitespace-normal wrap-break-word" checked={value} + disabled={!hasTeamPlan} onCheckedChange={onChange} Badge={} /> @@ -67,6 +70,7 @@ const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings?: CalVideoSet title={t("disable_recording_for_organizer")} labelClassName="text-sm leading-6 whitespace-normal wrap-break-word" checked={value} + disabled={!hasTeamPlan} onCheckedChange={onChange} Badge={} /> @@ -84,6 +88,7 @@ const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings?: CalVideoSet title={t("enable_automatic_recording")} labelClassName="text-sm" checked={value} + disabled={!hasTeamPlan} onCheckedChange={onChange} Badge={} /> @@ -101,6 +106,7 @@ const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings?: CalVideoSet title={t("enable_automatic_transcription")} labelClassName="text-sm leading-6 whitespace-normal wrap-break-word" checked={value} + disabled={!hasTeamPlan} onCheckedChange={onChange} Badge={} /> @@ -118,6 +124,7 @@ const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings?: CalVideoSet title={t("disable_transcription_for_guests")} labelClassName="text-sm leading-6 whitespace-normal wrap-break-word" checked={value} + disabled={!hasTeamPlan} onCheckedChange={onChange} Badge={} /> @@ -135,6 +142,7 @@ const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings?: CalVideoSet title={t("disable_transcription_for_organizer")} labelClassName="text-sm leading-6 whitespace-normal wrap-break-word" checked={value} + disabled={!hasTeamPlan} onCheckedChange={onChange} Badge={} /> @@ -153,6 +161,7 @@ const CalVideoSettings = ({ calVideoSettings }: { calVideoSettings?: CalVideoSet description={t("require_email_for_guests_description")} labelClassName="text-sm leading-6 whitespace-normal break-words" checked={value} + disabled={!hasTeamPlan} onCheckedChange={onChange} Badge={} />