feat(server): add project RBAC and guarded workflows

This commit is contained in:
2026-07-30 16:45:09 +08:00
parent 3fbb17bb30
commit ae1a657554
29 changed files with 1431 additions and 412 deletions
+7 -1
View File
@@ -1,4 +1,5 @@
from unittest.mock import AsyncMock
from uuid import uuid4
from fastapi.testclient import TestClient
@@ -10,7 +11,12 @@ from app.auth.metadata_dependencies import (
from tests.conftest import build_test_app, make_audit_log
def _build_client(repo, *, metadata_admin=None, metadata_user=None) -> TestClient:
def _build_client(
repo,
*,
metadata_admin=None,
metadata_user=None,
) -> TestClient:
app = build_test_app(audit_endpoint.router, "/audit")
app.dependency_overrides[audit_endpoint.get_audit_repository] = lambda: repo
if metadata_admin is not None: