Merge pull request 'Operator-Auth full implementation.' (#70) from feat/operator-auth into dev
Reviewed-on: #70
This commit was merged in pull request #70.
This commit is contained in:
@@ -89,6 +89,18 @@ async def add_environment_to_context(request: Request, call_next):
|
||||
response = await call_next(request)
|
||||
return response
|
||||
|
||||
# Operator auth — deny-by-default gate over the whole internal app. Governed by
|
||||
# OPERATOR_AUTH_ENABLED (default off → behaves exactly as today). See
|
||||
# docs/superpowers/specs/2026-06-17-operator-auth-design.md.
|
||||
from backend.operator_auth import operator_gate
|
||||
app.middleware("http")(operator_gate)
|
||||
|
||||
from backend.routers import operator_auth_routes
|
||||
app.include_router(operator_auth_routes.router)
|
||||
|
||||
from backend.routers import operator_users
|
||||
app.include_router(operator_users.router)
|
||||
|
||||
# Override TemplateResponse to include environment and version in context
|
||||
original_template_response = templates.TemplateResponse
|
||||
def custom_template_response(name, context=None, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user