feat(05-01): template list/detail/deploy API + RBAC + integration tests
- Create shared/api/templates.py with templates_router
- GET /api/portal/templates: list active templates (any authenticated user)
- GET /api/portal/templates/{id}: get template detail (any authenticated user)
- POST /api/portal/templates/{id}/deploy: create Agent snapshot (tenant_admin only)
- customer_operator returns 403 on deploy (RBAC enforced)
- Export templates_router from shared/api/__init__.py
- Mount templates_router in gateway/main.py (Phase 5 section)
- 11 integration tests pass (list, detail, deploy, RBAC, 404, snapshot independence)
This commit is contained in:
@@ -46,6 +46,7 @@ from shared.api import (
|
||||
invitations_router,
|
||||
llm_keys_router,
|
||||
portal_router,
|
||||
templates_router,
|
||||
usage_router,
|
||||
webhook_router,
|
||||
)
|
||||
@@ -140,6 +141,11 @@ app.include_router(webhook_router)
|
||||
# ---------------------------------------------------------------------------
|
||||
app.include_router(invitations_router)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Register Phase 5 Employee Design routers
|
||||
# ---------------------------------------------------------------------------
|
||||
app.include_router(templates_router)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Routes
|
||||
|
||||
Reference in New Issue
Block a user