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

fix: hide organizer email for collective events when enabled

Open RajdeepDs opened this issue 8 months ago • 4 comments

What does this PR do?

Prevent displaying the email of team members in collective events if the hideOrganizerEmail setting is enabled.

  • Fixes #21319
  • Fixes CAL-5771 (Linear issue number - should be visible at the bottom of the GitHub issue description)

Visual Demo (For contributors especially)

Image Demo:

Before: Screenshot 2025-05-15 215854 After: Screenshot 2025-05-15 215937

Mandatory Tasks (DO NOT REMOVE)

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

Summary by mrge

Hides team member emails in collective events when the hideOrganizerEmail setting is enabled, showing only the main attendee's email. This protects organizer privacy in group bookings.

RajdeepDs avatar May 15 '25 16:05 RajdeepDs

@RajdeepDs 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 May 15 '25 16:05 vercel[bot]

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (05/15/25)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (05/15/25)

1 label was added to this PR based on Keith Williams's automation.

graphite-app[bot] avatar May 15 '25 16:05 graphite-app[bot]

This PR is being marked as stale due to inactivity.

github-actions[bot] avatar Jun 10 '25 00:06 github-actions[bot]

Making the PR draft until then.

kart1ka avatar Jun 16 '25 07:06 kart1ka

Hey @kart1ka, I have made all the requested changes. Here's the demo video: https://cap.link/gvndb94xx4jrawn

Thanks,

RajdeepDs avatar Jun 26 '25 07:06 RajdeepDs

@RajdeepDs Pls address the cubic comments.

kart1ka avatar Jun 30 '25 18:06 kart1ka

[!NOTE]

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

[!IMPORTANT]

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes introduce conditional logic to hide email addresses of team members and attendees in collective or round robin events when the option to hide the organizer's email is enabled. In both the booking success view and the email component, the code now checks if the event type is "COLLECTIVE" or "ROUND_ROBIN" and if the hideOrganizerEmail flag is set. When these conditions are met, all member emails are hidden from the UI and emails. The rest of the code changes are stylistic or related to import order and do not affect functionality.

Assessment against linked issues

Objective Addressed Explanation
Hide all member emails from collective events if the option to hide organizer's email is enabled (#21319, CAL-5771)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes were found.

✨ Finishing Touches
🧪 Generate unit tests
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Jul 16 '25 06:07 coderabbitai[bot]

@kart1ka Just wanted to ask a few things:

  • In the first image, I saw the app is running on http://acme.app.local:3000/. How can I use this and regenerate this issue?
  • In the second image, the emails are visible. Should I just hide them or replace them with a placeholder?

RajdeepDs avatar Jul 22 '25 15:07 RajdeepDs

@kart1ka Just wanted to ask a few things:

  • In the first image, I saw the app is running on http://acme.app.local:3000/. How can I use this and regenerate this issue?
  • In the second image, the emails are visible. Should I just hide them or replace them with a placeholder?

acme.cal.local has nothing to do with the emails being visible. If you want to set it up you can do so by following this guide.

For the second image, yes the emails should be hidden. You can instead show the names of the hosts/organizers.

kart1ka avatar Sep 01 '25 07:09 kart1ka

I think there are many places where we need to apply this filter, not just these two files. For eg:- bookinglistItem etc

Okay will do that

RajdeepDs avatar Sep 02 '25 15:09 RajdeepDs

@RajdeepDs There is a type check failing. Please fix it.

kart1ka avatar Sep 06 '25 08:09 kart1ka

any eta on this? looking forward to have this functionality

msbt avatar Oct 13 '25 08:10 msbt

our team is super busy with major feature updates; the consumer team will accept it as soon as they get the time. thanks for your contribution though, it makes us where we are today. cheers :)

Pallava-Joshi avatar Oct 17 '25 12:10 Pallava-Joshi