src/dazzle_back/runtime/grant_store.py¶
Generated: 2026-03-30T04:38:47.301602+00:00
Commit: 615f1354a103
Language: python
Scope: dazzle_back
Purpose¶
Runtime grant store for dynamic RBAC grants.
Manages the _grants and _grant_events tables on PostgreSQL, providing CRUD operations with atomic status transitions and audit event logging.
Requires: psycopg >= 3.2
Key Exports¶
GrantStatusGrantStorecreate_grantapprove_grantreject_grantcancel_grantrevoke_granthas_active_grantlist_grantsexpire_stale_grants
Dependencies¶
Imports¶
jsondatetime.UTCdatetime.datetimeenum.StrEnumtyping.Anyuuid.UUIDuuid.uuid4
Event Interactions¶
None detected.
Invariants and Assumptions¶
- Validates: Grant {grant_id} not found
- Validates: Cannot {event_type} grant in status
Tests¶
tests/unit/test_grant_store.pytests/integration/test_runtime_e2e.pytests/integration/test_runtime_pipeline.pytests/unit/test_runtime_test_routes.pytests/unit/test_runtime_services.py
Notes¶
This page was automatically generated by tools/gen_reference_docs.py.