Add guest management functionality to existing bookings#2
Add guest management functionality to existing bookings#2akshayutture-augment wants to merge 1 commit into
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 <somaychauhan98@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 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.
Allow team admins or owners to authorize guest adds
The isTeamAdminOrOwner flag is computed with isTeamAdmin(...) && isTeamOwner(...), so a user must be both a team admin and a team owner at the same time for the mutation to proceed. That makes the feature unusable for legitimate team members that are only admins or only owners, because the FORBIDDEN branch at line 54 will always trigger for them. Combine the checks with || so either role can add guests as intended.
Useful? React with 👍 / 👎.
Test 10
Replicated from ai-code-review-evaluation/cal.com-cursor#10