mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
fix: Update permission for showing workflow caller policy (#4916)
* fix: Update permission for showing workflow caller polic * fix: remove unused store setting
This commit is contained in:
parent
990d13d366
commit
f73267ffa5
|
@ -805,7 +805,6 @@ export interface IN8nUISettings {
|
|||
deployment?: {
|
||||
type: string;
|
||||
};
|
||||
isWorkflowSharingEnabled: boolean;
|
||||
}
|
||||
|
||||
export interface IWorkflowSettings extends IWorkflowSettingsWorkflow {
|
||||
|
|
|
@ -41,6 +41,56 @@
|
|||
</n8n-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="isWorkflowSharingEnabled">
|
||||
<el-row>
|
||||
<el-col :span="10" class="setting-name">
|
||||
{{ $locale.baseText('workflowSettings.callerPolicy') + ':' }}
|
||||
<n8n-tooltip class="setting-info" placement="top">
|
||||
<template #content>
|
||||
<div v-text="helpTexts.workflowCallerPolicy"></div>
|
||||
</template>
|
||||
<font-awesome-icon icon="question-circle" />
|
||||
</n8n-tooltip>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="14" class="ignore-key-press">
|
||||
<n8n-select
|
||||
v-model="workflowSettings.callerPolicy"
|
||||
:placeholder="$locale.baseText('workflowSettings.selectOption')"
|
||||
size="medium"
|
||||
filterable
|
||||
:limit-popper-width="true"
|
||||
>
|
||||
<n8n-option
|
||||
v-for="option of workflowCallerPolicyOptions"
|
||||
:key="option.key"
|
||||
:label="option.value"
|
||||
:value="option.key"
|
||||
>
|
||||
</n8n-option>
|
||||
</n8n-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="workflowSettings.callerPolicy === 'workflowsFromAList'">
|
||||
<el-col :span="10" class="setting-name">
|
||||
{{ $locale.baseText('workflowSettings.callerIds') + ':' }}
|
||||
<n8n-tooltip class="setting-info" placement="top">
|
||||
<template #content>
|
||||
<div v-text="helpTexts.workflowCallerIds"></div>
|
||||
</template>
|
||||
<font-awesome-icon icon="question-circle" />
|
||||
</n8n-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<n8n-input
|
||||
type="text"
|
||||
size="medium"
|
||||
v-model="workflowSettings.callerIds"
|
||||
@input="onCallerIdsInput"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="10" class="setting-name">
|
||||
{{ $locale.baseText('workflowSettings.timezone') + ':' }}
|
||||
|
@ -181,56 +231,6 @@
|
|||
</n8n-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="isWorkflowSharingEnabled">
|
||||
<el-row>
|
||||
<el-col :span="10" class="setting-name">
|
||||
{{ $locale.baseText('workflowSettings.callerPolicy') + ':' }}
|
||||
<n8n-tooltip class="setting-info" placement="top">
|
||||
<template #content>
|
||||
<div v-text="helpTexts.workflowCallerPolicy"></div>
|
||||
</template>
|
||||
<font-awesome-icon icon="question-circle" />
|
||||
</n8n-tooltip>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="14" class="ignore-key-press">
|
||||
<n8n-select
|
||||
v-model="workflowSettings.callerPolicy"
|
||||
:placeholder="$locale.baseText('workflowSettings.selectOption')"
|
||||
size="medium"
|
||||
filterable
|
||||
:limit-popper-width="true"
|
||||
>
|
||||
<n8n-option
|
||||
v-for="option of workflowCallerPolicyOptions"
|
||||
:key="option.key"
|
||||
:label="option.value"
|
||||
:value="option.key"
|
||||
>
|
||||
</n8n-option>
|
||||
</n8n-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="workflowSettings.callerPolicy === 'workflowsFromAList'">
|
||||
<el-col :span="10" class="setting-name">
|
||||
{{ $locale.baseText('workflowSettings.callerIds') + ':' }}
|
||||
<n8n-tooltip class="setting-info" placement="top">
|
||||
<template #content>
|
||||
<div v-text="helpTexts.workflowCallerIds"></div>
|
||||
</template>
|
||||
<font-awesome-icon icon="question-circle" />
|
||||
</n8n-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<n8n-input
|
||||
type="text"
|
||||
size="medium"
|
||||
v-model="workflowSettings.callerIds"
|
||||
@input="onCallerIdsInput"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="10" class="setting-name">
|
||||
{{ $locale.baseText('workflowSettings.timeoutWorkflow') + ':' }}
|
||||
|
@ -327,7 +327,7 @@ import {
|
|||
WorkflowCallerPolicyDefaultOption,
|
||||
} from '@/Interface';
|
||||
import Modal from './Modal.vue';
|
||||
import { PLACEHOLDER_EMPTY_WORKFLOW_ID, WORKFLOW_SETTINGS_MODAL_KEY } from '../constants';
|
||||
import {EnterpriseEditionFeature, PLACEHOLDER_EMPTY_WORKFLOW_ID, WORKFLOW_SETTINGS_MODAL_KEY} from '../constants';
|
||||
|
||||
import mixins from 'vue-typed-mixins';
|
||||
|
||||
|
@ -402,7 +402,7 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
|||
return this.workflowsStore.workflowId;
|
||||
},
|
||||
isWorkflowSharingEnabled(): boolean {
|
||||
return this.settingsStore.isWorkflowSharingEnabled;
|
||||
return this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.WorkflowSharing);
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
|
|
|
@ -1310,8 +1310,8 @@
|
|||
"workflowSettings.callerIds": "Caller IDs",
|
||||
"workflowSettings.callerPolicy": "This workflow can be called by",
|
||||
"workflowSettings.callerPolicy.options.any": "Any workflow",
|
||||
"workflowSettings.callerPolicy.options.workflowsFromAList": "List of specific workflow IDs",
|
||||
"workflowSettings.callerPolicy.options.none": "No workflows can call one",
|
||||
"workflowSettings.callerPolicy.options.workflowsFromAList": "Selected workflows",
|
||||
"workflowSettings.callerPolicy.options.none": "No other workflows",
|
||||
"workflowSettings.defaultTimezone": "Default - {defaultTimezoneValue}",
|
||||
"workflowSettings.defaultTimezoneNotValid": "Default Timezone not valid",
|
||||
"workflowSettings.errorWorkflow": "Error Workflow",
|
||||
|
|
|
@ -127,9 +127,6 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, {
|
|||
isQueueModeEnabled(): boolean {
|
||||
return this.settings.executionMode === 'queue';
|
||||
},
|
||||
isWorkflowSharingEnabled(): boolean {
|
||||
return this.settings.isWorkflowSharingEnabled;
|
||||
},
|
||||
workflowCallerPolicyDefaultOption(): WorkflowCallerPolicyDefaultOption {
|
||||
return this.settings.workflowCallerPolicyDefaultOption;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue