Tietokilta / ilmomasiina

Event signup system for tietokilta.fi and beyond
MIT License
1 stars 9 forks source link

Initial admin creation wizard and some user management rework #123

Closed PurkkaKoodari closed 8 months ago

PurkkaKoodari commented 8 months ago

Fixes #80. The previous system for creating the initial admin user was clumsy (requiring manual HTTP requests) and easy to accidentally leave on. This PR replaces it with a nice frontend.

Implementation: when no users exist at server startup, the event list API throws an error until a user is created. This causes the frontend to redirect to a "create user" page. The API is always accessible but only works if no users exist in the database.

image

Also refactored the user management UI to be more consistent and added some safeguards.