-
Notifications
You must be signed in to change notification settings - Fork 0
Add guest management functionality to existing bookings #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: guest-management-base
Are you sure you want to change the base?
Conversation
* 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 <[email protected]>
|
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: |
|
cursor review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bugbot free trial expires on August 11, 2025
Learn more in the Cursor dashboard.
|
|
||
| const isTeamAdminOrOwner = | ||
| (await isTeamAdmin(user.id, booking.eventType?.teamId ?? 0)) && | ||
| (await isTeamOwner(user.id, booking.eventType?.teamId ?? 0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Permission Check Uses Incorrect Logical Operator
The isTeamAdminOrOwner permission check incorrectly uses the logical AND (&&) operator instead of OR (||). This requires a user to be both a team admin and a team owner to add guests, which is overly restrictive, as either role should grant permission.
| } else { | ||
| setIsInvalidEmail(true); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Email Validation Fails Due to Empty String Initialization
The validation logic is flawed because the multiEmailValue state is initialized with [""]. This causes the multiEmailValue.length === 0 check to be ineffective, allowing empty strings to be passed to the email validation schema. Consequently, validation fails when not all email fields are filled or when the input is effectively empty.
Locations (1)
|
This PR is being marked as stale due to inactivity. |
Test 10