You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make IsAdmin strict, gate wizard upload on IsWizardMode
Previously IsAdmin returned true when admin_users was empty, so the
wizard could upload images during setup. But that branch was reached
on every request, not just wizard endpoints — any deployment that
provisioned .env from configuration management would skip the wizard,
leave admin_users empty, and grant admin authority to anonymous
visitors on all routes guarded by IsAdmin.
Split the concern: IsAdmin now returns false when no admin user
exists. IsWizardMode is a new predicate (true iff admin_users is
empty) used only by UploadFile and UpdateSettings — the two
endpoints the wizard hits before the admin user is created.
Refs #529
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments