fix(roundtable): 会商 Step2/Step3 沙箱产物按对话创建者解析,修复历史/跨用户查看不了
圆桌会商系统线程(metadata.thread_type==roundtable)的 Step2 席位/总控 +
Step3 报告/总结/大屏/结构化 沙箱产物(md/流程图/报告)落在创建者目录下,
之前按当前登录解析路径 + owner_check 校验 → 历史草稿重开或 taskId 会商被
其他账号打开时 403/404 查看不了。沿用任务深链对话方案(23e6685)扩展到圆桌:
- thread_paths._is_creator_shared_thread:taskId 或 thread_type==roundtable
都解析到对话创建者(threads_meta.user_id),覆盖所有线程路径关口
- ThreadMetaRepository.check_access:圆桌系统线程同样跳过 owner 过滤
(artifacts 路由 owner_check 据此放行其他账号/历史查看)
线程 id 仅存在于草稿中,无关账号无法发现,与 taskId 共享模型一致。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
551c748aa8
commit
60626c384a
3 files changed
+32
-4
No files matched your search
+7
-2
@@ -97,8 +97,13 @@ class ThreadMetaRepository(ThreadMetaStore):
|
||||
row = await session.get(ThreadMetaRow, thread_id)
|
||||
if row is None:
|
||||
return not require_existing
|
||||
# 任务深链对话(metadata.taskId)全局共享、不区分用户:任何登录用户都可读写/续聊。
|
||||
if (row.metadata_json or {}).get("taskId"):
|
||||
md = row.metadata_json or {}
|
||||
# 全局共享、不区分用户(任何登录用户都可读写/续聊):
|
||||
# ① 任务深链对话(metadata.taskId);
|
||||
# ② 圆桌会商系统线程(metadata.thread_type=="roundtable")——其 Step2/Step3
|
||||
# 沙箱产物(md/流程图/报告)需让历史草稿或其他账号打开同一会商时也能查看,
|
||||
# 与任务深链对话一致(线程 id 仅存在于草稿中,不会被无关账号发现)。
|
||||
if md.get("taskId") or md.get("thread_type") == "roundtable":
|
||||
return True
|
||||
if row.user_id is None:
|
||||
return True
|
||||
|
||||
Reference in new issue
Block a user