Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ui/src/permission/modules/application/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ const system = {
* 系统「智能体」「概览」后端 API 访问权限
*/
overviewBackendApiAccess: () => canSys(P.RESOURCE_APPLICATION_OVERVIEW_BACKEND_API_ACCESS),
/**
* 系统「智能体」「概览」公众访问链接权限
*/
overviewPublic: () => canSys(P.RESOURCE_APPLICATION_OVERVIEW_PUBLIC),

// —— 访问 / 访客 / 对话日志 ——
/**
Expand Down
4 changes: 4 additions & 0 deletions ui/src/permission/modules/application/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ const workspace = {
* 工作空间「智能体」「概览」后端 API 访问权限
*/
overviewBackendApiAccess: (id: string) => canRes(P.APPLICATION_OVERVIEW_BACKEND_API_ACCESS, id),
/**
* 工作空间「智能体」「概览」公众访问链接权限
*/
overviewPublic: (id: string) => canRes(P.APPLICATION_OVERVIEW_PUBLIC,id),

// —— 访问 / 访客 / 对话日志 ——
/**
Expand Down
3 changes: 2 additions & 1 deletion ui/src/views/application-detail/overview/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type ApplicationOverviewPermissionMethod =
| 'overviewDisplay'
| 'overviewApiKey'
| 'overviewBackendApiAccess'
| 'overviewPublic'
function applicationOverviewPermission(method: ApplicationOverviewPermissionMethod): boolean {
if (isSystemResource()) return Boolean(perm.application.system[method]())
return Boolean(perm.application.workspace[method](applicationId.value))
Expand Down Expand Up @@ -142,7 +143,7 @@ onMounted(() => {
<div class="flex-between">
<h6>Web 访问</h6>
<!-- Web 访问开关 -->
<el-switch :model-value="webAccessActive" size="small" :disabled="loading" :before-change="handleChangeWebAccess" />
<el-switch :model-value="webAccessActive" size="small" :disabled="loading || !applicationOverviewPermission('overviewPublic')" :before-change="handleChangeWebAccess" />
</div>
<div class="space-y-2">
<div>链接</div>
Expand Down
Loading