feat: authentication secured event types (#23217)

* feat: EventType bookingRequiresAuthentication column

* feat: toggle EventType bookingRequiresAuthentication via api

* feat: check bookingRequiresAuthentication when booking

* docs: v2 swagger

* fix: ts error

* refactor: use Forbidden exception instead of Unauthorized

* refactor: use findFirst instead of unique

* fix: only count accepted memberships

* fix: orgs schedules docs

* regenerate docs

* chore: update platform libraries

* fix: unit test

* fix: e2e test
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2025-08-22 15:22:50 +01:00
1 parent aea6e105e6
commit e0dc2ba03a
25 files changed
+810 -17

No files matched your search

@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "EventType" ADD COLUMN "bookingRequiresAuthentication" BOOLEAN NOT NULL DEFAULT false;
+2
View File
@@ -228,6 +228,8 @@ model EventType {
restrictionSchedule Schedule? @relation("restrictionSchedule", fields: [restrictionScheduleId], references: [id])
hostGroups HostGroup[]
bookingRequiresAuthentication Boolean @default(false)
@@unique([userId, slug])
@@unique([teamId, slug])
@@unique([userId, parentId])
+1
View File
@@ -681,6 +681,7 @@ export const allManagedEventTypeProps: { [k in keyof Omit<Prisma.EventTypeSelect
rescheduleWithSameRoundRobinHost: true,
maxLeadThreshold: true,
customReplyToEmail: true,
bookingRequiresAuthentication: true,
};
// All properties that are defined as unlocked based on all managed props