@@ -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+ useIsUserAllowedToMakeChanges ,
19+ useIsViewerUser ,
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 isViewerUser = useIsViewerUser ( ) ;
3034
3135 const { title : clusterTitle } = useClusterBaseInfo ( ) ;
3236
@@ -39,7 +43,11 @@ function Header() {
3943 useAddClusterFeatureAvailable ( ) && uiFactory . onAddCluster !== undefined ;
4044
4145 const breadcrumbItems = React . useMemo ( ( ) => {
42- let options = { ...pageBreadcrumbsOptions , singleClusterMode} ;
46+ let options = {
47+ ...pageBreadcrumbsOptions ,
48+ singleClusterMode,
49+ isViewerUser,
50+ } ;
4351
4452 if ( clusterTitle ) {
4553 options = {
@@ -53,7 +61,7 @@ function Header() {
5361 return breadcrumbs . map ( ( item ) => {
5462 return { ...item , action : ( ) => { } } ;
5563 } ) ;
56- } , [ clusterTitle , page , pageBreadcrumbsOptions , singleClusterMode ] ) ;
64+ } , [ clusterTitle , page , pageBreadcrumbsOptions , singleClusterMode , isViewerUser ] ) ;
5765
5866 const renderRightControls = ( ) => {
5967 const elements : React . ReactNode [ ] = [ ] ;
0 commit comments