asxpio/db/migrations
Sergei Poljanski 9bf40690e5
admin: user accounts and session login
The admin was one shared HTTP Basic login: no way to give someone
partial access, revoke one person, or tell who changed what. Add a users
table and a session login form. Passwords are scrypt hashes from Ruby's
OpenSSL, so no native gem is needed. Sessions carry a per-user version
that is bumped on password change, which logs that user out everywhere.

ADMIN_USER/ADMIN_PASSWORD now bootstrap the first superuser on an empty
table and afterwards only work while no active superuser exists, as a
recovery path that re-creates one. Until per-area permissions land,
non-superusers only reach the dashboard and their own password page.

Assisted-by: Claude:opus-5
2026-10-10 08:25:46 +04:00
..
001_invoices.rb db: connection helper and invoices migration 2026-05-26 17:43:18 +03:00
002_invoice_ltc.rb ltc payments 2026-06-08 18:43:01 +03:00
003_invoice_crypto.rb invoices: multi-crypto payment support 2026-07-03 02:01:57 +04:00
004_bingo.rb bingo: serve datacenter bingo on bingo.asxp.io 2026-10-10 04:51:26 +04:00
005_bingo_photo_variants.rb bingo: SEO pass and resized photos 2026-10-10 06:26:03 +04:00
006_bingo_mw_type.rb bingo: planned status and capacity type 2026-10-10 06:59:04 +04:00
007_users.rb admin: user accounts and session login 2026-10-10 08:25:46 +04:00