]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18956 improve api/system/health permission requirement description
authorPierre <pierre.guillot@sonarsource.com>
Tue, 4 Apr 2023 15:34:42 +0000 (17:34 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 4 Apr 2023 20:03:15 +0000 (20:03 +0000)
server/sonar-webserver-webapi/src/main/java/org/sonar/server/platform/ws/HealthActionSupport.java

index aa2c68cd72128bfac4db45ad12461f596f817594..cbb8881e021845f9f509b8735af2d74bd2ee1ed5 100644 (file)
@@ -22,6 +22,7 @@ package org.sonar.server.platform.ws;
 import com.google.common.io.Resources;
 import java.util.Comparator;
 import org.sonar.api.server.ws.WebService;
+import org.sonar.process.ProcessProperties;
 import org.sonar.process.cluster.health.NodeDetails;
 import org.sonar.process.cluster.health.NodeHealth;
 import org.sonar.server.health.ClusterHealth;
@@ -52,7 +53,10 @@ public class HealthActionSupport {
         " <li>YELLOW: SonarQube is usable, but it needs attention in order to be fully operational</li>" +
         " <li>RED: SonarQube is not operational</li>" +
         " </ul>" +
-        "</p>")
+        "</p><br>" +
+        "Requires the 'Administer System' permission or " +
+        "system passcode (see " + ProcessProperties.Property.WEB_SYSTEM_PASS_CODE + " in sonar.properties).<br>" +
+        "When SonarQube is in safe mode (waiting or running a database upgrade), only the authentication with a system passcode is supported.")
       .setSince("6.6")
       .setResponseExample(Resources.getResource(this.getClass(), "example-health.json"))
       .setHandler(handler);