Normalize setup admin usernames #448

Merged
redpersongpt merged 1 commit from normalize-setup-admin-user into main 2026-06-01 15:38:57 +02:00
redpersongpt commented 2026-06-01 13:02:47 +02:00 (Migrated from github.com)

setup.py let ODYSSEUS_ADMIN_USER be written exactly as provided, but the auth manager lowercases usernames when it checks passwords and creates sessions. That means a generated AdminUser account is stored under AdminUser, then login looks for adminuser and misses it.

This normalizes the setup-created username the same way the auth code does. It may not explain every case in #423, but it fixes a real mismatch in the generated-admin path.

Checked:

  • venv/bin/python -m py_compile setup.py tests/test_setup_admin_user.py
  • venv/bin/python -m pytest -q tests/test_setup_admin_user.py
  • git diff --check origin/main...normalize-setup-admin-user
`setup.py` let `ODYSSEUS_ADMIN_USER` be written exactly as provided, but the auth manager lowercases usernames when it checks passwords and creates sessions. That means a generated `AdminUser` account is stored under `AdminUser`, then login looks for `adminuser` and misses it. This normalizes the setup-created username the same way the auth code does. It may not explain every case in #423, but it fixes a real mismatch in the generated-admin path. Checked: - `venv/bin/python -m py_compile setup.py tests/test_setup_admin_user.py` - `venv/bin/python -m pytest -q tests/test_setup_admin_user.py` - `git diff --check origin/main...normalize-setup-admin-user`
Sign in to join this conversation.
No description provided.