diff --git a/frontend/src/components/pages/admin/AdminPage.tsx b/frontend/src/components/pages/admin/AdminPage.tsx index 317228076..af1083b35 100644 --- a/frontend/src/components/pages/admin/AdminPage.tsx +++ b/frontend/src/components/pages/admin/AdminPage.tsx @@ -47,41 +47,47 @@ export default class AdminPage extends PageComponent { if (api.adminInfo === undefined) return DefaultSkeleton; const hasAdminPermissions = api.adminInfo !== null; + const items = [ + { + key: 'users', + name: 'Users', + component: + }, + { + key: 'roles', + name: 'Roles', + component: + }, + { + key: 'permissionsDebug', + name: 'Permissions debug', + component:
{toJson(api.adminInfo, 4)}
+ }, + ] + + if(api.userData?.canViewDebugBundle) { + items.push({ + key: 'debugBundle', + name: 'Debug bundle', + component: + }); + } + + items.push({ + key: 'licenses', + name: 'License details', + component: + }) + return
{hasAdminPermissions ? - - }, - { - key: 'roles', - name: 'Roles', - component: - }, - { - key: 'permissionsDebug', - name: 'Permissions debug', - component:
{toJson(api.adminInfo, 4)}
- }, - { - key: 'debugBundle', - name: 'Debug bundle', - component: - }, - { - key: 'licenses', - name: 'License details', - component: - }, - ]} /> + :
- You do not have the neccesary permissions to view this page. + You do not have the necessary permissions to view this page.
} diff --git a/frontend/src/components/pages/overview/ClusterHealthOverview.tsx b/frontend/src/components/pages/overview/ClusterHealthOverview.tsx index c829a58a2..cf139b56a 100644 --- a/frontend/src/components/pages/overview/ClusterHealthOverview.tsx +++ b/frontend/src/components/pages/overview/ClusterHealthOverview.tsx @@ -75,19 +75,21 @@ const ClusterHealthOverview = () => { } - - - Debug bundle - - {api.isDebugBundleInProgress && } - {api.isDebugBundleReady && } - {!api.isDebugBundleInProgress && } - - - + {api.userData?.canViewDebugBundle && + + + Debug bundle + + {api.isDebugBundleInProgress && } + {api.isDebugBundleReady && } + {!api.isDebugBundleInProgress && } + + + + } ); diff --git a/frontend/src/state/restInterfaces.ts b/frontend/src/state/restInterfaces.ts index ca21f35fd..a02997be9 100644 --- a/frontend/src/state/restInterfaces.ts +++ b/frontend/src/state/restInterfaces.ts @@ -526,6 +526,7 @@ export interface UserData { canCreateSchemas: boolean; canDeleteSchemas: boolean; canManageSchemaRegistry: boolean; + canViewDebugBundle: boolean; canListTransforms: boolean; canCreateTransforms: boolean;