Hermes Agent
f22802658e
feat: add conditional bootstrap login + 23 admin login tests
- Add hash_password/verify_password to app/auth.py using bcrypt
- Fix /login to reject bootstrap creds (403) when admin users exist
- Add normal password-based login path for existing admin users
- Eagerly load User.roles to avoid lazy-load outside async session
- Fix test_user_models.py VARCHAR assertion (SQLAlchemy 2.0 uses 'string')
- Use shared-cache SQLite in conftest for endpoint-level tests
- Add 23 tests covering all 3 required scenarios plus edge cases:
1. Bootstrap login with hardcoded creds when no admins → PASS (200)
2. Bootstrap login with hardcoded creds when admins exist → FAIL (403)
3. Password login for existing admin with hashed password → PASS (200)
- All 130 tests pass (107 existing + 23 new)
2026-07-30 06:35:52 +00:00
..
2026-07-19 05:55:58 +00:00
2026-06-11 22:34:55 -07:00
2026-06-23 00:30:47 +00:00
2026-07-30 06:35:52 +00:00
2026-07-04 21:10:36 +00:00
2026-07-04 21:10:36 +00:00
2026-07-04 21:10:36 +00:00
2026-07-19 05:55:58 +00:00
2026-07-04 21:10:36 +00:00
2026-07-06 06:52:18 +00:00
2026-06-28 06:41:23 +00:00
2026-06-22 19:29:06 +00:00
2026-07-04 21:10:36 +00:00
2026-07-06 06:52:18 +00:00
2026-07-04 21:10:36 +00:00