From 1121a17c11bd0317680da180b492bc598280046c Mon Sep 17 00:00:00 2001
From: Wu Tianwei <30284043+WTW0313@users.noreply.github.com>
Date: Wed, 15 Jul 2026 17:53:45 +0800
Subject: [PATCH] fix: allow workflow comments for layout users (#39014)
---
.../__tests__/rag-pipeline-main.spec.tsx | 12 +---------
.../components/rag-pipeline-main.tsx | 1 -
.../snippets/components/snippet-main.tsx | 1 -
.../__tests__/workflow-main.spec.tsx | 19 ---------------
.../workflow-app/components/workflow-main.tsx | 1 -
.../__tests__/panel-contextmenu.spec.tsx | 3 +--
.../components/workflow/hooks-store/store.ts | 2 --
.../use-workflow-panel-interactions.spec.tsx | 24 -------------------
.../hooks/__tests__/use-workflow.spec.ts | 1 -
.../hooks/use-workflow-panel-interactions.ts | 8 +------
.../__tests__/node-control.spec.tsx | 1 -
.../operator/__tests__/control.spec.tsx | 20 +---------------
.../components/workflow/panel-contextmenu.tsx | 3 +--
.../panel/__tests__/inputs-panel.spec.tsx | 1 -
web/utils/permission.spec.ts | 6 ++---
web/utils/permission.ts | 2 --
16 files changed, 7 insertions(+), 98 deletions(-)
diff --git a/web/app/components/rag-pipeline/components/__tests__/rag-pipeline-main.spec.tsx b/web/app/components/rag-pipeline/components/__tests__/rag-pipeline-main.spec.tsx
index f41db99644d..24d1baf4305 100644
--- a/web/app/components/rag-pipeline/components/__tests__/rag-pipeline-main.spec.tsx
+++ b/web/app/components/rag-pipeline/components/__tests__/rag-pipeline-main.spec.tsx
@@ -114,10 +114,9 @@ vi.mock('@/app/components/workflow', () => ({
hooksStore,
}: PropsWithChildren<{
onWorkflowDataUpdate?: (payload: unknown) => void
- hooksStore?: { accessControl?: { canComment?: boolean; canEdit?: boolean } }
+ hooksStore?: { accessControl?: { canEdit?: boolean } }
}>) => (
-
{String(hooksStore?.accessControl?.canComment)}
{String(hooksStore?.accessControl?.canEdit)}
{children}