Skip to content

Add guest management functionality to existing bookings#2

Open
akshayutture-augment wants to merge 1 commit into
guest-management-basefrom
guest-management-enhanced
Open

Add guest management functionality to existing bookings#2
akshayutture-augment wants to merge 1 commit into
guest-management-basefrom
guest-management-enhanced

Conversation

@akshayutture-augment

@akshayutture-augment akshayutture-augment commented Nov 14, 2025

Copy link
Copy Markdown

Test 10


Replicated from ai-code-review-evaluation/cal.com-cursor#10


Note

Cursor Bugbot is generating a summary for commit baa9045. Configure here.

* feat: ability to add guests via app.cal.com/bookings

* fix: some update

* fix: minor issue

* fix: final update

* update

* update

* add requested changes

* fix type error

* small update

* final update

* fix type error

* fix location

* update calender event

---------

Co-authored-by: Somay Chauhan <somaychauhan98@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.


const isTeamAdminOrOwner =
(await isTeamAdmin(user.id, booking.eventType?.teamId ?? 0)) &&
(await isTeamOwner(user.id, booking.eventType?.teamId ?? 0));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Permission Logic Error Blocks Valid Users.

The permission check uses && (AND) instead of || (OR) when checking if a user is a team admin or owner. This requires the user to be both an admin AND an owner simultaneously, which is impossible. The check should use || to allow users who are either admins or owners to add guests.

Fix in Cursor Fix in Web

(guest) =>
!booking.attendees.some((attendee) => guest === attendee.email) &&
!blacklistedGuestEmails.includes(guest)
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Case Sensitivity Allows Blacklist Bypass

The blacklist check compares lowercase blacklisted emails against the original case guest email. The blacklistedGuestEmails array is lowercased but guest is not, causing case-sensitive comparison. This allows blacklisted emails to bypass the filter if they use different casing (e.g., Test@example.com vs test@example.com).

Fix in Cursor Fix in Web

await eventManager.updateCalendarAttendees(evt, booking);

try {
await sendAddGuestsEmails(evt, guests);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Email Logic Confuses Guest Types

The function passes the original guests array to sendAddGuestsEmails instead of uniqueGuests. This causes existing attendees who were included in the input to incorrectly receive a "scheduled" email rather than an "add guests" notification, since the email logic checks if an attendee is in the newGuests array to determine which email template to use.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants