feat(automations): gate menu and route behind enable_automation

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-24 16:15:52 +03:30
co-authored by Cursor
parent 010e287c70
commit 67652f0cd8
6 changed files with 36 additions and 4 deletions
+2 -1
View File
@@ -26,7 +26,7 @@ import { useRouterStore } from '@core/stores/router'
import { useUserStore } from '@/store/userStore'
import { isDeployAdmin } from '@/utils/deployAdmin'
import { hasSmsPanelAccess, isSmsBillingEnabled } from '@/utils/smsPanelAccess'
import { bannerEnabledSetting, trackingSystemsEnabledSetting, appNotificationEnabledSetting } from '@/utils/config'
import { bannerEnabledSetting, trackingSystemsEnabledSetting, appNotificationEnabledSetting, automationEnabledSetting } from '@/utils/config'
import { get } from 'lodash'
import type { RouteRecordRaw } from 'vue-router'
@@ -40,6 +40,7 @@ const menu = computed(() => {
.filter((child) => !child.meta?.hideMenu)
.filter((child) => child.name !== 'banners' || bannerEnabledSetting.value)
.filter((child) => child.name !== 'appNotifications' || appNotificationEnabledSetting.value)
.filter((child) => child.name !== 'automations' || automationEnabledSetting.value)
.filter((child) => child.name !== 'captureSitesMain' || trackingSystemsEnabledSetting.value)
.filter(
(child) =>