From 6dc2199a81b6f89fb59e229556df8d6600f2e1c0 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 25 Oct 2024 17:56:42 +0530 Subject: [PATCH] fix: only show Invite Member settings page if manager --- frontend/src/components/Settings/Settings.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/Settings/Settings.vue b/frontend/src/components/Settings/Settings.vue index 372609a1..fa02fb1d 100644 --- a/frontend/src/components/Settings/Settings.vue +++ b/frontend/src/components/Settings/Settings.vue @@ -53,6 +53,7 @@ import WhatsAppSettings from '@/components/Settings/WhatsAppSettings.vue' import ERPNextSettings from '@/components/Settings/ERPNextSettings.vue' import TwilioSettings from '@/components/Settings/TwilioSettings.vue' import SidebarLink from '@/components/SidebarLink.vue' +import { usersStore } from '@/stores/users' import { isWhatsappInstalled, showSettings, @@ -61,6 +62,8 @@ import { import { Dialog, Plans, Billing } from 'frappe-ui' import { ref, markRaw, computed, watch } from 'vue' +const { isManager } = usersStore() + const tabs = computed(() => { let _tabs = [ { @@ -76,6 +79,7 @@ const tabs = computed(() => { label: __('Invite Members'), icon: 'user-plus', component: markRaw(InviteMemberPage), + condition: () => isManager(), }, ], },