Files
kmtnflower/backend
Hermes Agent ffbc19f16f fix(auth): only block bootstrap login when admin users exist
The previous check counted ALL users (func.count(User.id)), which
incorrectly blocked bootstrap login if any non-admin user (e.g.,
Google OAuth sign-in) already existed. The fix queries specifically
for admin users using the legacy is_admin flag OR the admin role
assignment in user_roles.

Also add tests for the non-admin-user-only scenario and fix the
stale test_non_admin_user_cannot_login_as_admin assertion (401
not 403 — bootstrap path is still active when no admin exists).
2026-07-30 09:44:42 +00:00
..
2026-06-11 22:34:55 -07:00
2026-06-30 21:51:09 +00:00
2026-06-22 05:43:27 +00:00