From: Jacek Date: Fri, 23 Apr 2021 08:42:13 +0000 (+0200) Subject: SONAR-14735 Improve log message for plugins risk consent warning X-Git-Tag: 8.9.0.43852~58 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f03a280eec91f2290459cafe2558156aaa0fa600;p=sonarqube.git SONAR-14735 Improve log message for plugins risk consent warning --- diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java index e677596b074..494cec61a4d 100644 --- a/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java +++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/plugins/PluginConsentVerifier.java @@ -72,7 +72,8 @@ public class PluginConsentVerifier implements Startable { private static void addWarningInSonarDotLog() { String highlighter = "####################################################################################################################"; - String msg = "Plugin(s) detected. The risk associated with installing plugins has not been accepted. The SonarQube admin needs to log in and accept the risk."; + String msg = "Plugin(s) detected. Plugins are not provided by SonarSource and are therefore installed at your own risk." + + " A SonarQube administrator needs to acknowledge this risk once logged in."; LOGGER.warn(highlighter); LOGGER.warn(msg); diff --git a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java index 15d8dcaf324..be4b1a9078a 100644 --- a/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java +++ b/server/sonar-webserver-api/src/test/java/org/sonar/server/plugins/PluginConsentVerifierTest.java @@ -68,7 +68,8 @@ public class PluginConsentVerifierTest { underTest.start(); - assertThat(logTester.logs(LoggerLevel.WARN)).contains("Plugin(s) detected. The risk associated with installing plugins has not been accepted. The SonarQube admin needs to log in and accept the risk."); + assertThat(logTester.logs(LoggerLevel.WARN)).contains("Plugin(s) detected. Plugins are not provided by SonarSource" + + " and are therefore installed at your own risk. A SonarQube administrator needs to acknowledge this risk once logged in."); assertThat(dbClient.propertiesDao().selectGlobalProperty(PLUGINS_RISK_CONSENT)) .extracting(PropertyDto::getValue) .isEqualTo(REQUIRED.name());