migration: establish exact preserved app baseline

This commit is contained in:
leefer
2026-07-30 23:51:48 +08:00
parent 41329943c4
commit 4083dceba3
399 changed files with 129967 additions and 23 deletions
+15
View File
@@ -0,0 +1,15 @@
from __future__ import annotations
from backend.http import AccessRole, ApiRouteRegistry
ROUTES = ApiRouteRegistry.load()
def required_role(method: str, path: str) -> AccessRole:
"""Compatibility access lookup backed by the authoritative route registry."""
route = ROUTES.resolve(method, path)
return route.access if route else "authenticated"
__all__ = ["ROUTES", "AccessRole", "required_role"]