Skip to content

src/dazzle_back/runtime/grant_routes.py

Generated: 2026-03-30T04:38:47.286621+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Grant management API routes.

Exposes CRUD endpoints for runtime RBAC grants so that has_grant() transition guards become reachable. Mounted at /api/grants/*.

Authorization: only roles listed in the matching GrantSchemaSpec.granted_by field may create or manage grants.

Key Exports

  • create_grant_routes
  • list_grants
  • create_grant
  • approve_grant
  • reject_grant
  • cancel_grant
  • revoke_grant

Dependencies

Imports

  • typing.Any
  • uuid.UUID
  • dazzle_back.runtime._fastapi_compat.FASTAPI_AVAILABLE
  • dazzle_back.runtime._fastapi_compat.APIRouter
  • dazzle_back.runtime._fastapi_compat.Depends
  • dazzle_back.runtime._fastapi_compat.HTTPException
  • dazzle_back.runtime._fastapi_compat.Query
  • dazzle_back.runtime.auth.AuthContext
  • dazzle_back.runtime.grant_store.GrantStore

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_grant_routes.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py
  • tests/unit/test_runtime_services.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.