diff --git a/packages/nc-gui-v2/components/tabs/Auth.vue b/packages/nc-gui-v2/components/tabs/Auth.vue index 21af03e881..a06f8b2558 100644 --- a/packages/nc-gui-v2/components/tabs/Auth.vue +++ b/packages/nc-gui-v2/components/tabs/Auth.vue @@ -2,22 +2,30 @@ import { useI18n } from 'vue-i18n' import UserManagement from './auth/UserManagement.vue' import ApiTokenManagement from './auth/ApiTokenManagement.vue' +import { useUIPermission } from '#imports' interface Tab { title: string + label: string body: any + isUIAllowed: boolean } const { t } = useI18n() + +const { isUIAllowed } = useUIPermission() + const tabsInfo: Tab[] = [ { title: 'Users Management', label: t('title.userMgmt'), body: () => UserManagement, + isUIAllowed: isUIAllowed('userMgmtTab'), }, { title: 'API Token Management', label: t('title.apiTokenMgmt'), body: () => ApiTokenManagement, + isUIAllowed: isUIAllowed('apiTokenTab'), }, ] @@ -28,7 +36,7 @@ const selectedTab = $computed(() => tabsInfo[selectedTabKey])