feat: 完成项目助手与监控演示并修复聊天及云部署配置

This commit is contained in:
NathanAlex7
2026-09-11 15:56:28 +08:00
parent c57d291f65
commit af1a1027d7
75 changed files with 5215 additions and 101 deletions
+3 -2
View File
@@ -32,16 +32,17 @@ def authorize(request: Request):
if user["role"] == "manager":
permitted = path in ("catalog", "access/context", "runs/history") or (path.startswith("plans/") and path.endswith("/run")) or (path.startswith("reports/") and request.method=="GET")
permitted = permitted or (path.startswith("coordination/") and (request.method == "GET" or path.endswith("/actions")))
permitted = permitted or path.startswith("project-assistant/")
permitted = permitted or (path.startswith(("collateral/", "workspace/")) and request.method == "GET")
if not permitted:
raise HTTPException(403, "客户经理无权管理配置")
if user["role"] == "reviewer" and request.method != "GET" and not path.endswith("/review") and not path.startswith(("reports/", "coordination/", "collateral/")):
if user["role"] == "reviewer" and request.method != "GET" and not path.endswith("/review") and not path.startswith(("reports/", "coordination/", "collateral/", "project-assistant/")):
raise HTTPException(403, "审核员仅可审核发布,不能修改配置或执行查询")
def check_project(request: Request, project_id: str):
user = request.state.identity
if user["role"] == "manager" and "*" not in user.get("projects", []) and project_id not in user.get("projects", []):
if "*" not in user.get("projects", []) and project_id not in user.get("projects", []):
raise HTTPException(403, "无权访问该项目")