]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12726 Hide security hotspots for portfolios
authorJeremy Davis <jeremy.davis@sonarsource.com>
Tue, 7 Jan 2020 17:23:58 +0000 (18:23 +0100)
committerSonarTech <sonartech@sonarsource.com>
Mon, 13 Jan 2020 19:46:36 +0000 (20:46 +0100)
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavMenu-test.tsx.snap

index 71258e7c207322a3e6ab9834de4e2e748cd622cd..72030ec00cd6d93563a0bc0cd0779520b6979598 100644 (file)
@@ -153,13 +153,15 @@ export class ComponentNavMenu extends React.PureComponent<Props> {
 
   renderSecurityHotspotsLink() {
     return (
-      <li>
-        <Link
-          activeClassName="active"
-          to={{ pathname: '/security_hotspots', query: this.getQuery() }}>
-          {translate('layout.security_hotspots')}
-        </Link>
-      </li>
+      !this.isPortfolio() && (
+        <li>
+          <Link
+            activeClassName="active"
+            to={{ pathname: '/security_hotspots', query: this.getQuery() }}>
+            {translate('layout.security_hotspots')}
+          </Link>
+        </li>
+      )
     );
   }
 
index 1b30f2e863ce4abaad05ba0ab21d1073f8b42223..a9d856cf7c70fcd9fe904e690805a7c0580d46fa 100644 (file)
@@ -509,23 +509,6 @@ exports[`should work for all qualifiers 2`] = `
       issues.page
     </Link>
   </li>
-  <li>
-    <Link
-      activeClassName="active"
-      onlyActiveOnIndex={false}
-      style={Object {}}
-      to={
-        Object {
-          "pathname": "/security_hotspots",
-          "query": Object {
-            "id": "foo",
-          },
-        }
-      }
-    >
-      layout.security_hotspots
-    </Link>
-  </li>
   <li>
     <Link
       activeClassName="active"
@@ -647,23 +630,6 @@ exports[`should work for all qualifiers 3`] = `
       issues.page
     </Link>
   </li>
-  <li>
-    <Link
-      activeClassName="active"
-      onlyActiveOnIndex={false}
-      style={Object {}}
-      to={
-        Object {
-          "pathname": "/security_hotspots",
-          "query": Object {
-            "id": "foo",
-          },
-        }
-      }
-    >
-      layout.security_hotspots
-    </Link>
-  </li>
   <li>
     <Link
       activeClassName="active"