Env-pinned admin gate
One environment variable, ADMIN_USER_ID — no is_admin column, no role table, nothing to escalate.
Что может видеть и делать единственный оператор v10r.dev — и где заканчиваются эти полномочия.
Transparency cuts both ways — what the operator can see and do, and the guarantees that limit it.
One environment variable, ADMIN_USER_ID — no is_admin column, no role table, nothing to escalate.
Non-admins get a generic 404 from any /admin/* path — the routes don't disclose their own existence.
Every admin write is logged to audit_log — no UPDATE or DELETE handler exists, so entries can't be erased.
Cron jobs that mutate user data run behind a Bearer token known only to Vercel Cron — never exposed in any UI.
Думаете, этот паттерн можно сделать лучше? Расскажите как.
Оставить отзыв