mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
feat: Add temporary env variable N8N_FOLDERS_ENABLED
(no-changelog) (#13374)
This commit is contained in:
parent
1e5feb195d
commit
aae55fe7ac
|
@ -156,6 +156,9 @@ export interface FrontendSettings {
|
|||
mfa: {
|
||||
enabled: boolean;
|
||||
};
|
||||
folders: {
|
||||
enabled: boolean;
|
||||
};
|
||||
banners: {
|
||||
dismissed: string[];
|
||||
};
|
||||
|
|
|
@ -370,4 +370,13 @@ export const schema = {
|
|||
env: 'N8N_PROXY_HOPS',
|
||||
doc: 'Number of reverse-proxies n8n is running behind',
|
||||
},
|
||||
|
||||
folders: {
|
||||
enabled: {
|
||||
format: Boolean,
|
||||
default: false,
|
||||
env: 'N8N_FOLDERS_ENABLED',
|
||||
doc: 'Temporary env variable to enable folders feature',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -233,6 +233,9 @@ export class FrontendService {
|
|||
},
|
||||
easyAIWorkflowOnboarded: false,
|
||||
partialExecution: this.globalConfig.partialExecutions,
|
||||
folders: {
|
||||
enabled: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -360,6 +363,8 @@ export class FrontendService {
|
|||
|
||||
this.settings.enterprise.projects.team.limit = this.license.getTeamProjectLimit();
|
||||
|
||||
this.settings.folders.enabled = config.get('folders.enabled');
|
||||
|
||||
return this.settings;
|
||||
}
|
||||
|
||||
|
|
|
@ -140,4 +140,7 @@ export const defaultSettings: FrontendSettings = {
|
|||
version: 1,
|
||||
enforce: false,
|
||||
},
|
||||
folders: {
|
||||
enabled: false,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -43,6 +43,8 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|||
const ldap = ref({ loginLabel: '', loginEnabled: false });
|
||||
const saml = ref({ loginLabel: '', loginEnabled: false });
|
||||
const mfa = ref({ enabled: false });
|
||||
const folders = ref({ enabled: false });
|
||||
|
||||
const saveDataErrorExecution = ref<WorkflowSettings.SaveDataExecution>('all');
|
||||
const saveDataSuccessExecution = ref<WorkflowSettings.SaveDataExecution>('all');
|
||||
const saveManualExecutions = ref(false);
|
||||
|
@ -141,6 +143,8 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|||
|
||||
const isMfaFeatureEnabled = computed(() => mfa.value.enabled);
|
||||
|
||||
const isFoldersFeatureEnabled = computed(() => folders.value.enabled);
|
||||
|
||||
const areTagsEnabled = computed(() =>
|
||||
settings.value.workflowTagsDisabled !== undefined ? !settings.value.workflowTagsDisabled : true,
|
||||
);
|
||||
|
@ -203,6 +207,7 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|||
}
|
||||
|
||||
mfa.value.enabled = settings.value.mfa?.enabled;
|
||||
folders.value.enabled = settings.value.folders?.enabled;
|
||||
|
||||
if (settings.value.enterprise?.showNonProdBanner) {
|
||||
useUIStore().pushBannerToStack('NON_PRODUCTION_LICENSE');
|
||||
|
@ -411,6 +416,7 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, () => {
|
|||
logLevel,
|
||||
isTelemetryEnabled,
|
||||
isMfaFeatureEnabled,
|
||||
isFoldersFeatureEnabled,
|
||||
isAiAssistantEnabled,
|
||||
areTagsEnabled,
|
||||
isHiringBannerEnabled,
|
||||
|
|
Loading…
Reference in a new issue