summaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-09-10 13:30:18 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-09-10 13:30:18 +0200
commit2b15283097074e479ec03307960e4ff4d992876a (patch)
treec44bde5a5de27287e99cd74bd1a2fba2ad857aa4 /server/sonar-web
parentcb7e2f07f11e664657993dcb3214b084a9936f01 (diff)
downloadsonarqube-2b15283097074e479ec03307960e4ff4d992876a.tar.gz
sonarqube-2b15283097074e479ec03307960e4ff4d992876a.zip
fix display of component administration links
Diffstat (limited to 'server/sonar-web')
-rw-r--r--server/sonar-web/src/main/js/apps/nav/component/component-nav-menu.jsx16
1 files changed, 15 insertions, 1 deletions
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');
},