yumoqing e95e618372 security: 权限门禁收紧为owner组织角色
- _require_admin→_require_owner: 持有任一orgtypeid='owner'角色(含通配)放行
- 不再仅限superuser/admin; 其他组织(含ownerx前缀伪造)一律拒绝
- 工具描述/文案同步更新
2026-09-02 16:14:18 +08:00

66 lines
3.8 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"widgettype": "VBox",
"options": {"width": "100%", "height": "100%", "padding": "0"},
"subwidgets": [
{
"widgettype": "HBox",
"options": {"width": "100%", "alignItems": "center", "padding": "16px 24px 8px 24px", "cheight": 6, "gap": "12px"},
"subwidgets": [
{"widgettype": "Title2", "options": {"text": "平台内部助手"}},
{"widgettype": "Text", "options": {"text": "平台运维/管理 agent · 模型自动配置 · 仅owner组织角色可用", "cfontsize": 0.9, "color": "#94a3b8"}},
{"widgettype": "Filler"},
{
"widgettype": "Button",
"id": "new_session_btn",
"options": {"label": " 新建会话", "css": "small"},
"binds": [{
"wid": "self",
"event": "click",
"actiontype": "script",
"target": "self",
"script": "var tp=bricks.getWidgetById('platform_tabs',bricks.app);if(!tp)return;var sid='p'+Date.now()+'_'+Math.floor(Math.random()*100000);var n=tp.opts.items.length+1;tp.open_tab({name:'psession_'+sid,label:'会话 '+n,removable:true,content:{widgettype:'VBox',options:{css:'filler',width:'100%',height:'100%'},subwidgets:[{widgettype:'urlwidget',options:{url:'/pipeline_core/api/agent_menus.dspy?session_id='+sid+'&pipeline_id=platform_general',method:'GET'}},{widgettype:'AgentIO',options:{css:'filler',margin:'0 24px 24px 24px',url:'/pipeline_core/api/agent_chat.dspy?session_id='+sid+'&pipeline_id=platform_general',model_dataurl:'/pipeline_core/api/agent_model_options.dspy?session_id='+sid+'&pipeline_id=platform_general',model_cwidth:14,placeholder:'例如:通读这份文档并配置模型 <文档URL>...'}}]}});"
}]
}
]
},
{
"widgettype": "TabPanel",
"id": "platform_tabs",
"options": {
"css": "filler",
"width": "100%",
"height": "100%",
"tab_pos": "top",
"items": [
{
"name": "platform_default",
"label": "会话 1",
"removable": false,
"content": {
"widgettype": "VBox",
"options": {"css": "filler", "width": "100%", "height": "100%"},
"subwidgets": [
{
"widgettype": "urlwidget",
"options": {"url": "{{entire_url('/pipeline_core/api/agent_menus.dspy')}}?session_id=default_platform_general&pipeline_id=platform_general", "method": "GET"}
},
{
"widgettype": "AgentIO",
"options": {
"css": "filler",
"margin": "0 24px 24px 24px",
"url": "/pipeline_core/api/agent_chat.dspy?session_id=default_platform_general&pipeline_id=platform_general",
"model_dataurl": "/pipeline_core/api/agent_model_options.dspy?session_id=default_platform_general&pipeline_id=platform_general",
"model_cwidth": 14,
"placeholder": "例如:通读这份文档并配置模型 <文档URL>..."
}
}
]
}
}
]
}
}
]
}