@@ -14,7 +14,10 @@ import {DEVELOPER_UI_TITLE} from '../../utils/constants';
1414import { createDeveloperUIInternalPageHref } from '../../utils/developerUI/developerUI' ;
1515import { useTypedSelector } from '../../utils/hooks' ;
1616import { useDatabaseFromQuery } from '../../utils/hooks/useDatabaseFromQuery' ;
17- import { useIsUserAllowedToMakeChanges } from '../../utils/hooks/useIsUserAllowedToMakeChanges' ;
17+ import {
18+ useIsOnlyDatabaseUser ,
19+ useIsUserAllowedToMakeChanges ,
20+ } from '../../utils/hooks/useIsUserAllowedToMakeChanges' ;
1821
1922import { getBreadcrumbs } from './breadcrumbs' ;
2023import { headerKeyset } from './i18n' ;
@@ -27,6 +30,7 @@ function Header() {
2730 const { page, pageBreadcrumbsOptions} = useTypedSelector ( ( state ) => state . header ) ;
2831 const singleClusterMode = useTypedSelector ( ( state ) => state . singleClusterMode ) ;
2932 const isUserAllowedToMakeChanges = useIsUserAllowedToMakeChanges ( ) ;
33+ const isOnlyDatabaseUser = useIsOnlyDatabaseUser ( ) ;
3034
3135 const { title : clusterTitle } = useClusterBaseInfo ( ) ;
3236
@@ -39,7 +43,7 @@ function Header() {
3943 useAddClusterFeatureAvailable ( ) && uiFactory . onAddCluster !== undefined ;
4044
4145 const breadcrumbItems = React . useMemo ( ( ) => {
42- let options = { ...pageBreadcrumbsOptions , singleClusterMode} ;
46+ let options = { ...pageBreadcrumbsOptions , singleClusterMode, isOnlyDatabaseUser } ;
4347
4448 if ( clusterTitle ) {
4549 options = {
@@ -53,7 +57,7 @@ function Header() {
5357 return breadcrumbs . map ( ( item ) => {
5458 return { ...item , action : ( ) => { } } ;
5559 } ) ;
56- } , [ clusterTitle , page , pageBreadcrumbsOptions , singleClusterMode ] ) ;
60+ } , [ clusterTitle , page , pageBreadcrumbsOptions , singleClusterMode , isOnlyDatabaseUser ] ) ;
5761
5862 const renderRightControls = ( ) => {
5963 const elements : React . ReactNode [ ] = [ ] ;
0 commit comments