fix: 产线隔离——会话项目跨产线时清空,防元景项目劫持商机/投标产线会话
This commit is contained in:
parent
05e740d662
commit
eaebca297d
@ -151,8 +151,13 @@ class Gateway:
|
||||
ctx = {"pid": "", "pipeline_id": "", "name": "", "project_model_name": ""}
|
||||
else:
|
||||
ctx = await self.resolve_project(user_id, session_id)
|
||||
# 无当前项目 → 用入口指定的默认产线(投标/开发产线各自独立入口的关键)
|
||||
if not ctx.get("pipeline_id") and pipeline_id:
|
||||
# 产线隔离:入口指定产线时,会话项目必须同产线才生效——
|
||||
# 防止"元景项目"(sdlc_general)劫持商机/投标产线会话。
|
||||
if pipeline_id and ctx.get("pipeline_id") and ctx["pipeline_id"] != pipeline_id:
|
||||
ctx["pid"] = ""
|
||||
ctx["pipeline_id"] = pipeline_id
|
||||
# 无当前项目 → 用入口指定的默认产线
|
||||
elif not ctx.get("pipeline_id") and pipeline_id:
|
||||
ctx["pipeline_id"] = pipeline_id
|
||||
|
||||
# 1.5 模型解析与项目级持久化(优先级:本次显式选择 > 项目已设 > 个人全局 > 产线默认)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user