diff --git a/packages/frontend/editor-ui/src/components/NodeDetailsView.vue b/packages/frontend/editor-ui/src/components/NodeDetailsView.vue index 29e34e647e..54fdbd38a5 100644 --- a/packages/frontend/editor-ui/src/components/NodeDetailsView.vue +++ b/packages/frontend/editor-ui/src/components/NodeDetailsView.vue @@ -19,7 +19,6 @@ import TriggerPanel from './TriggerPanel.vue'; import { APP_MODALS_ELEMENT_ID, BASE_NODE_SURVEY_URL, - EnterpriseEditionFeature, EXECUTABLE_TRIGGER_NODE_TYPES, MODAL_CONFIRM, START_NODE_TYPE, @@ -31,7 +30,6 @@ import { dataPinningEventBus, ndvEventBus } from '@/event-bus'; import { useWorkflowsStore } from '@/stores/workflows.store'; import { useNDVStore } from '@/stores/ndv.store'; import { useNodeTypesStore } from '@/stores/nodeTypes.store'; -import { useSettingsStore } from '@/stores/settings.store'; import { useDeviceSupport } from '@n8n/composables/useDeviceSupport'; import { useNodeHelpers } from '@/composables/useNodeHelpers'; import { useMessage } from '@/composables/useMessage'; @@ -76,7 +74,6 @@ const pinnedData = usePinnedData(activeNode); const workflowActivate = useWorkflowActivate(); const nodeTypesStore = useNodeTypesStore(); const workflowsStore = useWorkflowsStore(); -const settingsStore = useSettingsStore(); const deviceSupport = useDeviceSupport(); const telemetry = useTelemetry(); const i18n = useI18n(); @@ -333,25 +330,9 @@ const blockUi = computed( () => workflowsStore.isWorkflowRunning || isExecutionWaitingForWebhook.value, ); -const foreignCredentials = computed(() => { - const credentials = activeNode.value?.credentials; - const usedCredentials = workflowsStore.usedCredentials; - - const foreignCredentialsArray: string[] = []; - if (credentials && settingsStore.isEnterpriseFeatureEnabled[EnterpriseEditionFeature.Sharing]) { - Object.values(credentials).forEach((credential) => { - if ( - credential.id && - usedCredentials[credential.id] && - !usedCredentials[credential.id].currentUserHasAccess - ) { - foreignCredentialsArray.push(credential.id); - } - }); - } - - return foreignCredentialsArray; -}); +const foreignCredentials = computed(() => + nodeHelpers.getForeignCredentialsIfSharingEnabled(activeNode.value?.credentials), +); const hasForeignCredential = computed(() => foreignCredentials.value.length > 0); @@ -850,7 +831,6 @@ onBeforeUnmount(() => { :event-bus="settingsEventBus" :dragging="isDragging" :push-ref="pushRef" - :node-type="activeNodeType" :foreign-credentials="foreignCredentials" :read-only="readOnly" :block-u-i="blockUi && showTriggerPanel" diff --git a/packages/frontend/editor-ui/src/components/NodeSettings.vue b/packages/frontend/editor-ui/src/components/NodeSettings.vue index 35210cd404..1b7854362d 100644 --- a/packages/frontend/editor-ui/src/components/NodeSettings.vue +++ b/packages/frontend/editor-ui/src/components/NodeSettings.vue @@ -1,14 +1,13 @@