更新平台治理

This commit is contained in:
wangjiming
2026-08-17 09:15:36 +08:00
parent de9c8e4ffe
commit 6c1bf61ff7
13 changed files with 561 additions and 339 deletions

View File

@@ -178,8 +178,8 @@ def filter_accessible_resource_ids(
).fetchall()
accessible = {r["resource_id"] for r in rows}
if resource_type in owner_tables:
table, column = owner_tables[resource_type]
if resource_type in OWNER_TABLES:
table, column = OWNER_TABLES[resource_type]
with store.connect() as conn:
owned = conn.execute(f"SELECT id FROM {table} WHERE {column}=?", (user_id,)).fetchall()
accessible.update(row["id"] for row in owned)