File tree Expand file tree Collapse file tree 2 files changed +6
-14
lines changed
spaces/public/views/nav_control Expand file tree Collapse file tree 2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -83,23 +83,10 @@ export const security = (kibana) => new kibana.Plugin({
8383 const config = server . config ( ) ;
8484
8585 return {
86- showUserProfile : true ,
8786 secureCookies : config . get ( 'xpack.security.secureCookies' ) ,
8887 sessionTimeout : config . get ( 'xpack.security.sessionTimeout' ) ,
8988 enableSpaceAwarePrivileges : config . get ( 'xpack.spaces.enabled' ) ,
9089 } ;
91- } ,
92- replaceInjectedVars : function ( vars , request ) {
93- const { settings } = request . route ;
94- // Don't show user profile if requested page is not authenticated.
95- // (there won't be a user...)
96- if ( settings . auth === false ) {
97- return {
98- ...vars ,
99- showUserProfile : false ,
100- } ;
101- }
102- return vars ;
10390 }
10491 } ,
10592
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ module.controller(
5757 let mounted = false ;
5858
5959 $scope . $parent . $watch ( 'isVisible' , function isVisibleWatcher ( isVisible : boolean ) {
60- if ( isVisible && ! mounted && ! pathProvider . isStatusPage ( ) ) {
60+ if ( isVisible && ! mounted && ! pathProvider . isUnauthenticated ( ) ) {
6161 render (
6262 < NavControlPopover
6363 spacesManager = { spacesManager }
@@ -102,6 +102,11 @@ chromeHeaderNavControlsRegistry.register(
102102 side : NavControlSide . Left ,
103103 render ( el : HTMLElement ) {
104104 const userProfile = Private ( UserProfileProvider ) ;
105+ const pathProvider = Private ( PathProvider ) ;
106+
107+ if ( pathProvider . isUnauthenticated ( ) ) {
108+ return ;
109+ }
105110
106111 const spaceSelectorURL = chrome . getInjected ( 'spaceSelectorURL' ) ;
107112
You can’t perform that action at this time.
0 commit comments