ghostguild-org/server/api
Jennie Robinson Faber f34b062f2a fix(events): enforce series-pass, hidden, and deadline gates
Pre-launch P0 fixes surfaced by docs/specs/events-functional-test-matrix.md
(Findings 1, 2, 3).

1. Series-pass bypass (Finding 1 / matrix S1 P3): register.post.js now
   loads the linked Series when tickets.requiresSeriesTicket is set and
   rejects drop-in registration unless series.allowIndividualEventTickets
   is true or the user has a valid pass. Data-integrity 500 if the
   referenced series is missing.

2. Hidden-event leak (Finding 2 / matrix E11): extract loadPublicEvent
   into server/utils/loadEvent.js. All five public event endpoints
   ([id].get, register, tickets/available, tickets/reserve,
   tickets/purchase) now go through the helper, which 404s when
   isVisible === false and the requester is not an admin. Admin detection
   uses a new non-throwing getOptionalMember() in server/utils/auth.js
   (extracted from the pattern already inlined in api/auth/status.get.js).

3. Deadline enforcement + legacy pricing retirement (Finding 3 / matrix
   E8): register.post.js and tickets/reserve.post.js delegate gating to
   validateTicketPurchase (which already covers deadline, cancelled,
   started, members-only, sold-out, and already-registered);
   tickets/available.get.js gets an explicit registrationDeadline check.
   Legacy pricing.paymentRequired 402 branch removed from register.post.js.
2026-04-20 19:03:34 +01:00
..
admin feat(emails): warmer copy across invite, welcome, and event emails 2026-04-20 13:48:38 +01:00
auth merge: catch up with feature/helcim-plan-consolidation base 2026-04-19 21:33:40 +01:00
board refactor(board): atomic delete + query limit + composable cleanup 2026-04-15 12:47:53 +01:00
dev feat(server): rename contributionTier → contributionAmount in routes + utils 2026-04-19 18:44:29 +01:00
events fix(events): enforce series-pass, hidden, and deadline gates 2026-04-20 19:03:34 +01:00
helcim feat(payments): log initial Helcim charge to Payment on subscription creation 2026-04-20 13:16:53 +01:00
invite feat(signup): unify cadence UX across accept-invite, join, and account 2026-04-20 12:34:59 +01:00
members feat(payments): log Helcim charge on free-to-paid upgrade 2026-04-20 13:19:21 +01:00
onboarding feat(member): account/profile polish + tier upgrade flow 2026-04-14 20:35:37 +01:00
series refactor(events): gate member benefits on hasMemberAccess 2026-04-18 17:06:17 +01:00
site-content New SiteContent. 2026-04-16 21:11:14 +01:00
tags feat: add Tags API endpoints and validation schemas 2026-04-05 16:15:29 +01:00
upload Add Zod validation, fix mass assignment, remove test endpoints and dead code 2026-03-01 14:02:46 +00:00
wiki fix: rename hasEngagedEcology → hasEngagedBoard in onboarding status, clean up stale ecology references 2026-04-14 12:25:24 +01:00
health.get.js feat: add /api/health endpoint for uptime monitoring 2026-04-04 12:35:26 +01:00