From f533245c9a73a0be2dd6e87124e23c8d4374295c Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Mon, 21 Oct 2019 12:19:19 +0200 Subject: [PATCH] SONAR-12590 Don't show New Code Period menu entry for portfolios or applications --- .../nav/component/ComponentNavMenu.tsx | 3 + .../ComponentNavMenu-test.tsx.snap | 63 ------------------- 2 files changed, 3 insertions(+), 63 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx index 83bd2377ccc..aa133ded13d 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMenu.tsx @@ -274,6 +274,9 @@ export class ComponentNavMenu extends React.PureComponent { } renderBaselineLink() { + if (!this.getConfiguration().showSettings || this.isApplication() || this.isPortfolio()) { + return null; + } return (
  • -
  • - - project_baseline.page - -
  • - -
  • - - project_baseline.page - -
  • - - } - tagName="li" - > - -
    `; @@ -578,23 +532,6 @@ exports[`should work for all qualifiers 4`] = `