From 2b15283097074e479ec03307960e4ff4d992876a Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 10 Sep 2015 13:30:18 +0200 Subject: [PATCH] fix display of component administration links --- .../js/apps/nav/component/component-nav-menu.jsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/src/main/js/apps/nav/component/component-nav-menu.jsx b/server/sonar-web/src/main/js/apps/nav/component/component-nav-menu.jsx index c50cd53be52..c3679649e63 100644 --- a/server/sonar-web/src/main/js/apps/nav/component/component-nav-menu.jsx +++ b/server/sonar-web/src/main/js/apps/nav/component/component-nav-menu.jsx @@ -29,7 +29,18 @@ export default React.createClass({ }, renderAdministration() { - if (!this.props.conf.showSettings) { + let shouldShowAdministration = + this.props.conf.showActionPlans || + this.props.conf.showDeletion || + this.props.conf.showHistory || + this.props.conf.showLinks || + this.props.conf.showManualMeasures || + this.props.conf.showPermissions || + this.props.conf.showQualityGates || + this.props.conf.showQualityProfiles || + this.props.conf.showSettings || + this.props.conf.showUpdateKey; + if (!shouldShowAdministration) { return null; } let isSettingsActive = SETTINGS_URLS.some(url => { @@ -58,6 +69,9 @@ export default React.createClass({ }, renderSettingsLink() { + if (!this.props.conf.showSettings) { + return null; + } const url = `/project/settings?id=${encodeURIComponent(this.props.component.key)}`; return this.renderLink(url, window.t('project_settings.page'), '/project/settings'); }, -- 2.39.5