Add Super Admin panel with user impersonation
- New /super-admin/login and /super-admin routes with separate auth - Super admin can view all registered accounts and impersonate any user - Impersonation banner shows at top of screen with exit button - ADMIN_USERNAME and ADMIN_PASSWORD config added to .env and docker-compose.yml - Fixed auth store: export setToken, clearToken, and setUser so they are accessible from superAdmin store - Updated README with super admin feature, new env vars, and setup notes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ from app.config import get_settings
|
||||
from app.database import engine
|
||||
from app.models import Base
|
||||
from app.routers import auth, users, children, subjects, schedules, sessions, logs, dashboard
|
||||
from app.routers import morning_routine, break_activity
|
||||
from app.routers import morning_routine, break_activity, admin
|
||||
from app.websocket.manager import manager
|
||||
|
||||
settings = get_settings()
|
||||
@@ -66,6 +66,7 @@ app.include_router(logs.router)
|
||||
app.include_router(morning_routine.router)
|
||||
app.include_router(break_activity.router)
|
||||
app.include_router(dashboard.router)
|
||||
app.include_router(admin.router)
|
||||
|
||||
|
||||
@app.get("/api/health")
|
||||
|
||||
Reference in New Issue
Block a user