Skip to content

Commit

Permalink
⚡ Only auto-selecting credentials on cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Mar 16, 2023
1 parent 0871857 commit f136ec0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/editor-ui/src/utils/nodeTypesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f136ec0

Please sign in to comment.