From 50f01a16ba8ce9552d384020770daa64d45280fd Mon Sep 17 00:00:00 2001 From: Max Techera Date: Tue, 20 Jan 2026 16:48:42 -0300 Subject: [PATCH] fix(components): remove userId override in dropdowns to respect workspace filtering Closes #853 --- .../components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts | 4 ---- packages/components/nodes/agentflow/Retriever/Retriever.ts | 4 ---- .../nodes/agents/OpenAIAssistant/OpenAIAssistant.ts | 4 ---- .../nodes/documentloaders/DocumentStore/DocStoreLoader.ts | 4 ---- .../nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts | 4 ---- packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts | 4 ---- .../nodes/vectorstores/DocumentStoreVS/DocStoreVector.ts | 4 ---- 7 files changed, 28 deletions(-) diff --git a/packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts b/packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts index 4d8c707ba60..e2f0765ad18 100644 --- a/packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts +++ b/packages/components/nodes/agentflow/ExecuteFlow/ExecuteFlow.ts @@ -129,10 +129,6 @@ class ExecuteFlow_Agentflow implements INode { } const searchOptions = options.searchOptions || {} - searchOptions.where = { - ...searchOptions.where, - userId: options.userId - } const chatflows = await appDataSource.getRepository(databaseEntities['ChatFlow']).findBy(searchOptions) for (let i = 0; i < chatflows.length; i += 1) { diff --git a/packages/components/nodes/agentflow/Retriever/Retriever.ts b/packages/components/nodes/agentflow/Retriever/Retriever.ts index 27ed4792d66..e7ce426c230 100644 --- a/packages/components/nodes/agentflow/Retriever/Retriever.ts +++ b/packages/components/nodes/agentflow/Retriever/Retriever.ts @@ -121,10 +121,6 @@ class Retriever_Agentflow implements INode { } const searchOptions = options.searchOptions || {} - searchOptions.where = { - ...searchOptions.where, - userId: options.userId - } const stores = await appDataSource.getRepository(databaseEntities['DocumentStore']).findBy(searchOptions) for (const store of stores) { if (store.status === 'UPSERTED') { diff --git a/packages/components/nodes/agents/OpenAIAssistant/OpenAIAssistant.ts b/packages/components/nodes/agents/OpenAIAssistant/OpenAIAssistant.ts index 56590820c4b..734732debca 100644 --- a/packages/components/nodes/agents/OpenAIAssistant/OpenAIAssistant.ts +++ b/packages/components/nodes/agents/OpenAIAssistant/OpenAIAssistant.ts @@ -110,10 +110,6 @@ class OpenAIAssistant_Agents implements INode { } const searchOptions = options.searchOptions || {} - searchOptions.where = { - ...searchOptions.where, - userId: options.userId - } const assistants = await appDataSource.getRepository(databaseEntities['Assistant']).findBy({ ...searchOptions, type: 'OPENAI' diff --git a/packages/components/nodes/documentloaders/DocumentStore/DocStoreLoader.ts b/packages/components/nodes/documentloaders/DocumentStore/DocStoreLoader.ts index 51cbeae185a..7198a97817b 100644 --- a/packages/components/nodes/documentloaders/DocumentStore/DocStoreLoader.ts +++ b/packages/components/nodes/documentloaders/DocumentStore/DocStoreLoader.ts @@ -65,10 +65,6 @@ class DocStore_DocumentLoaders implements INode { } const searchOptions = options.searchOptions || {} - searchOptions.where = { - ...searchOptions.where, - userId: options.userId - } const stores = await appDataSource.getRepository(databaseEntities['DocumentStore']).findBy(searchOptions) for (const store of stores) { if (store.status === 'SYNC') { diff --git a/packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts b/packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts index 2f3c5ad75b5..c1bc2fbca88 100644 --- a/packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts +++ b/packages/components/nodes/sequentialagents/ExecuteFlow/ExecuteFlow.ts @@ -135,10 +135,6 @@ class ExecuteFlow_SeqAgents implements INode { } const searchOptions = options.searchOptions || {} - searchOptions.where = { - ...searchOptions.where, - userId: options.userId - } const chatflows = await appDataSource.getRepository(databaseEntities['ChatFlow']).findBy(searchOptions) for (let i = 0; i < chatflows.length; i += 1) { diff --git a/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts b/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts index 525c52b71a9..dca30e1f943 100644 --- a/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts +++ b/packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts @@ -135,10 +135,6 @@ class ChatflowTool_Tools implements INode { } const searchOptions = options.searchOptions || {} - searchOptions.where = { - ...searchOptions.where, - userId: options.userId - } const chatflows = await appDataSource.getRepository(databaseEntities['ChatFlow']).findBy(searchOptions) for (let i = 0; i < chatflows.length; i += 1) { diff --git a/packages/components/nodes/vectorstores/DocumentStoreVS/DocStoreVector.ts b/packages/components/nodes/vectorstores/DocumentStoreVS/DocStoreVector.ts index e4383534583..cbc339632b4 100644 --- a/packages/components/nodes/vectorstores/DocumentStoreVS/DocStoreVector.ts +++ b/packages/components/nodes/vectorstores/DocumentStoreVS/DocStoreVector.ts @@ -57,10 +57,6 @@ class DocStore_VectorStores implements INode { } const searchOptions = options.searchOptions || {} - searchOptions.where = { - ...searchOptions.where, - userId: options.userId - } const stores = await appDataSource.getRepository(databaseEntities['DocumentStore']).findBy(searchOptions) for (const store of stores) { if (store.status === 'UPSERTED') {