feat: add tenant-scoped rule and permission management

This commit is contained in:
wren
2026-05-21 22:03:08 +08:00
parent a2c2bf1969
commit 1f1bccf3b3
193 changed files with 64463 additions and 1771 deletions
@@ -263,7 +263,7 @@ class GovdocRunner:
await session.execute(
text(
"""
SELECT COALESCE(region, 'default') AS region
SELECT COALESCE(NULLIF(region, ''), '公共') AS region
FROM leaudit_documents
WHERE id = :document_id
LIMIT 1
@@ -272,7 +272,7 @@ class GovdocRunner:
{"document_id": DocumentId},
)
).mappings().first()
return str(row["region"] or "default") if row else "default"
return str(row["region"] or "公共") if row else "公共"
def _BuildArtifactRow(
self,