Repository navigation
feat: Add unlisted visibility option for event types - #237
KitKat31337 wants to merge 2 commits into
Conversation
|
I still need to test this locally, hence the draft status. |
|
Your split — Public / Unlisted / Private, with booking access separated from directory discoverability — is the right decomposition, and it still is. Two things have changed since you opened this. One: the PR is now conflicting and hasn't moved since Nov 6, so it needs a decision either way. Two: #269 has since asked for a fourth state — hidden from every public surface, but still bookable with credentials. That isn't Unlisted: Unlisted is bookable by anyone holding the link. Adding it separately would give us two half-models of visibility, built in parallel, each with its own gates. So I've written the model up once in #272: Which would you prefer?
Either is fine, but please pick one rather than letting it sit conflicting. If I don't hear back within a week I'll take option 2 so the queue doesn't stall, and say so on #272. One detail that changes your diff slightly: #272 settles that |
Summary
Add Unlisted visibility for event types so administrators can share directly accessible booking pages without listing them in public directories.
The existing Public checkbox is replaced with three visibility options. Booking-page accessibility and directory discoverability are now separate, while existing Public, Private, and Active behavior is preserved.
Behavior
Public
Unlisted
Private
Active remains independent of visibility. Inactive event types remain unbookable and absent from directories across all three visibility states.
Unlisted is a discoverability feature, not an access-control mechanism. Anyone with the direct URL can access an active Unlisted booking page.
Implementation
00072_event_type_unlisted.sqlwith anis_unlistedcolumn defaulting to0.is_publicas the existing direct-booking gate:is_public = 1,is_unlisted = 0is_public = 1,is_unlisted = 1is_public = 0visibilityfield to administration responses and create/PATCH requests, acceptingpublic,unlisted, orprivate.New event types default to Public. All visibility states remain manageable through the existing administration and ownership rules.
The authenticated MCP booking catalog retains its existing bookability filter.
Backward Compatibility and Migration
Existing installations retain their behavior after upgrading:
Legacy PATCH requests using
is_publiccontinue to select Public or Private and clear the Unlisted flag. If bothvisibilityandis_publicare supplied, they must agree on direct-booking accessibility.Rolling back migration
00072converts Unlisted event types to Private before removing the new column, preventing an older binary from unexpectedly listing them publicly.Testing
Added regression coverage for:
Validation passed:
go test ./...make buildScope
This change is limited to event-type visibility and existing directory filtering.
It does not change authentication, authorization, invitation-based scheduling, event-type ownership or routing, availability calculations, or booking rules. No separate directory functionality is introduced.