towerops/lib/towerops_web/controllers
Graham McIntire 853d548f82
Add superuser system with user impersonation for admin support
Implement comprehensive admin interface allowing designated superusers to view all users and organizations, impersonate users for debugging, and perform administrative operations. All superuser actions are tracked in audit logs for compliance.

Features:
- Superuser authentication with dedicated admin routes at /admin
- User impersonation with session state preservation
- Admin dashboard with system statistics
- User and organization management interfaces
- Comprehensive audit logging with IP tracking
- Visual impersonation banner with exit capability
- Security controls preventing self-impersonation and superuser-to-superuser impersonation

Database:
- Add is_superuser boolean field to users table
- Create audit_logs table for tracking sensitive operations
- Set graham@mcintire.me as initial superuser
2026-01-06 12:50:10 -06:00
..
user_registration_html Improve UI styling and remove DaisyUI dependencies 2026-01-03 11:02:38 -06:00
user_session_html Add comprehensive test coverage for LiveView modules and contexts 2026-01-03 11:21:53 -06:00
user_settings_html Add global header to user settings page 2026-01-04 11:38:07 -06:00
admin_controller.ex Add superuser system with user impersonation for admin support 2026-01-06 12:50:10 -06:00
error_html.ex init 2025-12-21 11:10:43 -06:00
error_json.ex init 2025-12-21 11:10:43 -06:00
health_controller.ex Add /health endpoint for Kubernetes probes 2026-01-04 10:56:03 -06:00
page_controller.ex more features 2026-01-02 14:06:44 -06:00
page_html.ex init 2025-12-21 11:10:43 -06:00
user_registration_controller.ex 1. User Authentication 2025-12-21 13:31:59 -06:00
user_registration_html.ex 1. User Authentication 2025-12-21 13:31:59 -06:00
user_session_controller.ex fix dialyzer things 2026-01-03 12:56:40 -06:00
user_session_html.ex 1. User Authentication 2025-12-21 13:31:59 -06:00
user_settings_controller.ex fix dialyzer things 2026-01-03 12:56:40 -06:00
user_settings_html.ex 1. User Authentication 2025-12-21 13:31:59 -06:00