Per-client ICS calendar feed #22
Notifications
Due Date
No due date set.
Blocks
Depends on
#25 Decommission Easy!Appointments + n8n booking-sync
BPPP/smb-online
#15 Booking schema + tenancy-safe data access layer
BPPP/smb-online
Reference: BPPP/smb-online#22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#14
What to build
A subscribable external calendar feed for the owner, scoped only to their own bookings, replacing
the current shared-token feed that lets any token-holder view any client's bookings by changing a
query parameter.
/api/bookings.ics(or equivalent) gated by the per-clientics_token(from ticket 1'sclients.ics_tokencolumn) instead of the current single sharedICS_TOKEN+client_idqueryparam.
it to their phone/desktop calendar app.
Acceptance criteria
ics_tokenonly ever returns client A's bookings — client B's token cannot besubstituted to view client A's feed, and there is no way to view another client's feed by
varying a query parameter alone.
bookings.icsformat alreadyused by calendar apps today, so existing subscriptions aren't broken in an unexpected way at
cutover.
Blocked by
Implemented in
24d9aca.clients.ics_tokenis now generated lazily (booking_db.ensure_ics_token) on first/owner/settingsvisit -- no separate backfill migration needed for existing clients./api/bookings.ics?token=...resolves the client directly from the token (get_client_by_ics_token); the old sharedICS_TOKENenv var and theclient_idquery param are both gone, so there's no way to view another client's feed by varying a parameter. Added a partial unique index onclients.ics_tokento guarantee the token->client mapping is 1:1.Acceptance criteria:
test_swapping_client_id_query_param_has_no_effect).Full test suite (131 tests) green via the Docker-based runner.