Skip to content

Commit 35e598c

Browse files
committed
address PR feedback
1 parent 8fe14a9 commit 35e598c

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

x-pack/plugins/security/index.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff 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

x-pack/plugins/spaces/public/views/nav_control/nav_control.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)