Add authProxy support to chat completions#6949
Conversation
Coverage Report
File CoverageNo changed files found. |
|
✅ Docs Preview Deployed! 🔗 👀 Click here to visit preview 🕒 Time: 2026-05-28 17:34:42 (UTC+8) |
|
✅ Build Successful - Preview mcp_server Image for this PR: 🕒 Time: 2026-05-25 10:41:01 (UTC+8) |
|
✅ Build Successful - Preview fastgpt Image for this PR: 🕒 Time: 2026-05-28 17:41:55 (UTC+8) |
|
✅ Build Successful - Preview code-sandbox Image for this PR: 🕒 Time: 2026-05-25 10:40:08 (UTC+8) |
|
✅ Admin Preview Image Ready! 🕒 Time: 2026-05-28 17:29:43 (UTC+8) |
6e1f187 to
8099b8d
Compare
8099b8d to
0fe34f0
Compare
c121914yu
left a comment
There was a problem hiding this comment.
代码审查结论:核心 authProxy 鉴权链路和 Agent 知识库 authTmbId 贯通整体合理。下面有一个建议级问题,主要影响继承权限资源的私有/公开展示判定,建议合并前修正。
| return { | ||
| Per: getPer(String(app.parentId)).addRole(getPer(String(app._id)).role), | ||
| privateApp: getClbCount(String(app.parentId)) <= 1 | ||
| privateApp: |
There was a problem hiding this comment.
这里建议调整 privateApp 的计算方式。当前把父资源和子资源的 permission 记录直接相加;在继承权限场景下,父文件夹有 owner 记录,子 app 自身也有同一个 owner 记录,即使只有 owner 一个人也会被数成 2,导致私有资源被误判为公开。建议按 collaborator 身份去重后判断,或显式判断是否存在 owner 以外的协作者。
| return { | ||
| Per: getPer(String(dataset.parentId)).addRole(getPer(String(dataset._id)).role), | ||
| privateDataset: getClbCount(String(dataset.parentId)) <= 1 | ||
| privateDataset: |
There was a problem hiding this comment.
这里和 app/list.ts 有同类问题:父资源 + 子资源的 permission 记录直接计数,会让继承权限且只有同一个 owner 的 dataset 被误判为非私有。建议按 collaborator 身份去重,或只要不存在 owner 以外的协作者就保持 privateDataset=true。
84bf3e7 to
4c3b2f9
Compare
4c3b2f9 to
9a3d604
Compare
No description provided.