cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

fix: enforce team-only access on premium toggles in cal video (#25680)

Open eeshm opened this issue 3 weeks ago • 4 comments

What does this PR do?

This PR fixes a permissions bug in Cal Video Settings where premium Cal Video features (recording, transcription, and guest controls) were incorrectly toggleable by users without a team plan.

Visual Demo (For contributors especially)

A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).

Video Demo (if applicable):

before : All toggles were interactive for non-team users

https://github.com/user-attachments/assets/b25439b1-47e7-4ca3-a9f7-7ace73787d3b

after:

https://github.com/user-attachments/assets/df1ae9dd-826d-40b6-b96e-a599a8c7fb50

Mandatory Tasks (DO NOT REMOVE)

  • [x] I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • [x] I have updated the developer docs in /docs if this PR makes changes that would require a documentation change.N/A
  • [x] I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Log in as a free-tier user or a user without a team plan
  • Navigate to: Event Types → Cal Video Settings
  • Validate:All 7 premium toggles are disabled
  • UpgradeTeamsBadge or disabled UI appears
  • Log in as a team plan member
  • Validate: All toggles behave normally (enabled, interactive)\

References

  1. appearance-view.tsx Location: apps/web/modules/settings/my-account/appearance-view.tsx Used as the pattern for individual premium features (hasPaidPlan).

  2. CreateOrEditOutOfOfficeModal.tsx Location: packages/features/out-of-office/components/CreateOrEditOutOfOfficeModal.tsx Correct pattern for team-only features using hasTeamPlan.

  3. CalVideoSettings.tsx (Bug location) Missing disabled props entirely on premium toggles. This is where the fix was applied: added useHasTeamPlan and disabled={!hasTeamPlan} to all premium settings.

eeshm avatar Dec 07 '25 16:12 eeshm

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 07 '25 16:12 CLAassistant

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Fix/calvideo teamplan toggle". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

github-actions[bot] avatar Dec 07 '25 16:12 github-actions[bot]

@eeshm is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Dec 07 '25 16:12 vercel[bot]

@dhairyashiil @Pallava-Joshi

eeshm avatar Dec 09 '25 05:12 eeshm

@anikdhabal Can you review this pr ?

eeshm avatar Dec 11 '25 06:12 eeshm

Thanks for pointing this out! I’ve disabled the “Enter a redirect URL…” field for non-team users and added the UpgradeTeamsBadge for consistency with the other Cal Video premium settings. Video of the updated behavior is attached.

Let me know if you'd prefer it without the badge.

https://github.com/user-attachments/assets/afbeea94-b1aa-43b4-bf88-096ca003cfde

eeshm avatar Dec 11 '25 10:12 eeshm

Hi @dhairyashiil , made the changes. Can you review thir pr now.

eeshm avatar Dec 12 '25 16:12 eeshm