]> source.dussan.org Git - sonarqube.git/commitdiff
fix display of component administration links
authorStas Vilchik <vilchiks@gmail.com>
Thu, 10 Sep 2015 11:30:18 +0000 (13:30 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 10 Sep 2015 11:30:18 +0000 (13:30 +0200)
server/sonar-web/src/main/js/apps/nav/component/component-nav-menu.jsx

index c50cd53be52ad5b592c82ec5501d642d31c817ef..c3679649e638b5ed27174b0832e696a886109f9d 100644 (file)
@@ -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');
   },