Skip to content

src/dazzle_ui/runtime/surface_access.py

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

Commit: 615f1354a103

Language: python

Scope: dazzle_ui

Purpose

Surface access control types for Dazzle UI page routes.

Pure Python types and check function — no FastAPI dependency. These are used by page_routes.py to enforce access control on server-rendered pages.

The dazzle_back package imports the FastAPI-specific helpers (middleware factory, exception han...

Key Exports

  • SurfaceAccessDenied
  • SurfaceAccessConfig
  • check_surface_access
  • from_spec

Dependencies

Imports

  • __future__.annotations
  • dataclasses.dataclass
  • typing.Any

Event Interactions

None detected.

Invariants and Assumptions

  • User must have at least one of the allowed personas

Tests

  • tests/unit/test_surface_access_parsing.py
  • tests/unit/test_surface_access_enforcement.py
  • tests/integration/test_runtime_e2e.py
  • tests/integration/test_runtime_pipeline.py
  • tests/unit/test_runtime_test_routes.py

Notes

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