From: Stas Vilchik Date: Thu, 10 Sep 2015 11:30:18 +0000 (+0200) Subject: fix display of component administration links X-Git-Tag: 5.2-RC1~445 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2b15283097074e479ec03307960e4ff4d992876a;p=sonarqube.git fix display of component administration links --- 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'); },