refactor(core): Store projectId on additionalData independent of dataStore context (no-changelog) (#19093)

This commit is contained in:
Charlie Kolb
2025-09-11 09:21:40 +02:00
committed by GitHub
parent a0d92a72b9
commit 6dd7797c39
6 changed files with 43 additions and 43 deletions

View File

@@ -8,7 +8,10 @@ declare module 'n8n-workflow' {
hooks?: ExecutionLifecycleHooks;
externalSecretsProxy: ExternalSecretsProxy;
'data-table'?: { dataStoreProxyProvider: DataStoreProxyProvider };
dataStoreProjectId?: string;
// Project ID is currently only added on the additionalData if the user
// has data table listing permission for that project. We should consider
// that only data tables belonging to their respective projects are shown.
dataTableProjectId?: string;
}
}

View File

@@ -17,14 +17,14 @@ export function getDataStoreHelperFunctions(
await dataStoreProxyProvider.getDataStoreAggregateProxy(
workflow,
node,
additionalData.dataStoreProjectId,
additionalData.dataTableProjectId,
),
getDataStoreProxy: async (dataStoreId: string) =>
await dataStoreProxyProvider.getDataStoreProxy(
workflow,
node,
dataStoreId,
additionalData.dataStoreProjectId,
additionalData.dataTableProjectId,
),
};
}