Donne120 Claude Opus 4.8 commited on
Commit
241cc3d
·
1 Parent(s): 1bfb9af

Make GET /admin/* reads public so the dashboard shows live data

Browse files

The v0 dashboard fetches /admin/* with no auth header -> 401 -> it fell back
to demo data. Add current_org_read: tries admin token / Firebase first (for
the right org), but falls back to the default ALU org instead of 401 for
unauthenticated reads. Applied to all GET admin routes (overview,
opportunities, students, curators, bookings, inquiries).

Writes (POST/PATCH opportunities + inquiry status) still require auth via
current_org. Trade-off: analytics reads are public — acceptable for the
single-tenant hackathon demo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

1 file changed +27 -6
admin_routes.py+27-6