Commit Graph
25 Commits
Author SHA1 Message Date
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
Hermes Agent 0eca079f28 feat: add role-based admin support for multiple admin users
- Add Role model and user_roles association table (many-to-many)
- Add password_hash column to User model (nullable, for future bcrypt)
- Keep is_admin boolean for backward compatibility
- Add is_admin_effective property: true if legacy is_admin OR 'admin' role
- Update auth dependency (get_current_admin_user) to use is_admin_effective
- Update bootstrap login to auto-create 'admin' role and assign on login
- Update Google OAuth login to use is_admin_effective for token creation
- Add migrate_roles.py: idempotent migration script to backfill roles
- Add unit tests for Role, User, association table, and is_admin_effective
2026-07-30 04:54:30 +00:00
kfj001 39b3e633a6 Fixes security issue: potential remote Path Traversal via File Upload 2026-07-19 05:55:58 +00:00
kfj001 a4093e86b1 fixes generated image download 2026-07-08 23:18:07 -07:00
kfj001 57198cd671 Fixes build results console log screen 2026-07-08 20:32:00 -07:00
kfj001 2c66a802c0 incorporates and implements mobile build service functionality. 2026-07-08 15:02:22 -07:00
Your Name 8cd54459ec Adds website theme serialization system 2026-07-06 06:52:18 +00:00
kfj001 ba99e88303 updates service api endpoints to allow for nginx forwarding with ssh 2026-07-04 21:10:36 +00:00
kfj001 7a04fa7c84 sets default admin creds in docker compose. first pass remote builder feature 2026-07-04 18:40:29 +00:00
kfj001 87c9b0b8ab better color control 2026-06-30 03:52:00 +00:00
kfj001 ee79662e5d adds color themeing support to the site 2026-06-29 21:23:51 +00:00
kfj001 77d1c04d86 Adds visitor dashboard and related features 2026-06-28 06:41:23 +00:00
kfj001 2295f841c9 Adds Underwriter's carousel and admin features 2026-06-23 06:50:08 +00:00
kfj001 9b95bef9c6 Retires Support/donation/tiers page in favor of simple configurable link 2026-06-23 00:30:47 +00:00
kfj001 3b61a131c1 database driven image uploader and storage service model 2026-06-22 19:29:06 +00:00
kfj001 76894061c5 more changes 2026-06-22 05:43:27 +00:00
kfj001 9049b066ba Remove Programs tab and all supporting code
The Programs feature is superseded by Shows, which provides a more
flexible model with schedule slots. This commit removes all Programs
code across frontend and backend:

Frontend:
- Delete admin-program-form component (ts/html/scss)
- Delete program.service.ts and program.ts interface
- Remove Programs tab, form modal, and all CRUD logic from admin
  component (ts + html)

Backend:
- Delete programs API router
- Remove Program ORM model and ProgramCreate/Update/Response schemas
- Remove programs router registration from main.py
- Remove Program from seed data, seed helpers, and truncate/reset
2026-06-22 05:42:43 +00:00
kfj001 eb9a00f21a Adds the new shows admin screen and drives schedule from it 2026-06-22 04:19:51 +00:00
kfj001 e627fe3637 New programming screen 2026-06-21 21:55:55 +00:00
kfj001 1b537b3dfd data driven about us screen 2026-06-21 05:24:40 +00:00
kfj001 f52625b37b working basic site admin 2026-06-21 02:56:49 +00:00
kfj001 2d2b2d040b additional files 2026-06-19 17:37:19 +00:00
kfj001 266c2451f1 Admin mode. Data driven content sections. Bugfixes. 2026-06-19 17:36:35 +00:00
kfj001 57b882128d working dev environment 2026-06-18 08:29:03 +00:00
kfj001 e5fef8b181 working 3 tier approach 2026-06-11 22:34:55 -07:00