From f136ec092a24aab74ca003e4f45793c1ad781607 Mon Sep 17 00:00:00 2001 From: Milorad Filipovic Date: Thu, 16 Mar 2023 16:49:16 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Only=20auto-selecting=20credentials?= =?UTF-8?q?=20on=20cloud?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor-ui/src/utils/nodeTypesUtils.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/editor-ui/src/utils/nodeTypesUtils.ts b/packages/editor-ui/src/utils/nodeTypesUtils.ts index 52235e8974c17..b13a2b258c7ce 100644 --- a/packages/editor-ui/src/utils/nodeTypesUtils.ts +++ b/packages/editor-ui/src/utils/nodeTypesUtils.ts @@ -38,6 +38,7 @@ import { import { isResourceLocatorValue, isJsonKeyObject } from '@/utils'; import { useCredentialsStore } from '@/stores/credentials'; import { i18n as locale } from '@/plugins/i18n'; +import { useSettingsStore } from '@/stores/settings'; /* Constants and utility functions mainly used to get information about @@ -400,11 +401,13 @@ export const getNodeAuthOptions = ( field.options.map((option) => { // Check if credential type associated with this auth option has overwritten properties let hasOverrides = false; - const cred = getNodeCredentialForSelectedAuthType(nodeType, option.value); - if (cred) { - hasOverrides = - useCredentialsStore().getCredentialTypeByName(cred.name).__overwrittenProperties !== - undefined; + if (useSettingsStore().isCloudDeployment) { + const cred = getNodeCredentialForSelectedAuthType(nodeType, option.value); + if (cred) { + hasOverrides = + useCredentialsStore().getCredentialTypeByName(cred.name).__overwrittenProperties !== + undefined; + } } return { name: