From eb2426685a1b59ab48a7e7adeba73a36024206bb Mon Sep 17 00:00:00 2001 From: Aurelien Poscia Date: Fri, 31 Mar 2023 14:22:18 +0200 Subject: [PATCH] SONAR-18879 add documentation URL for SCIM errors --- .../v100/LogMessageIfSonarScimEnabledPresentProperty.java | 4 +++- .../LogMessageIfSonarScimEnabledPresentPropertyTest.java | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v100/LogMessageIfSonarScimEnabledPresentProperty.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v100/LogMessageIfSonarScimEnabledPresentProperty.java index 2888982640d..58a3ba3e6a7 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v100/LogMessageIfSonarScimEnabledPresentProperty.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v100/LogMessageIfSonarScimEnabledPresentProperty.java @@ -29,6 +29,7 @@ public class LogMessageIfSonarScimEnabledPresentProperty extends DataChange { private static final Logger LOG = Loggers.get(LogMessageIfSonarScimEnabledPresentProperty.class); public static final String SONAR_SCIM_ENABLED = "sonar.scim.enabled"; + private static final String SCIM_DOC_URL = "https://docs.sonarqube.org/10.1/instance-administration/authentication/saml/scim/overview/"; public LogMessageIfSonarScimEnabledPresentProperty(Database db) { super(db); @@ -40,6 +41,7 @@ public class LogMessageIfSonarScimEnabledPresentProperty extends DataChange { .setString(1, SONAR_SCIM_ENABLED) .scroll(row -> LOG.warn("'{}' property is defined but not read anymore." + " Please read the upgrade notes for the instruction to upgrade. User provisioning is deactivated until reactivated" + - " from the SonarQube Administration Interface (\"General->Authentication\").", SONAR_SCIM_ENABLED)); + " from the SonarQube Administration Interface (\"General->Authentication\"). See documentation: {}", SONAR_SCIM_ENABLED, + SCIM_DOC_URL)); } } diff --git a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v100/LogMessageIfSonarScimEnabledPresentPropertyTest.java b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v100/LogMessageIfSonarScimEnabledPresentPropertyTest.java index cf71c218aac..7bd3a481880 100644 --- a/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v100/LogMessageIfSonarScimEnabledPresentPropertyTest.java +++ b/server/sonar-db-migration/src/test/java/org/sonar/server/platform/db/migration/version/v100/LogMessageIfSonarScimEnabledPresentPropertyTest.java @@ -61,7 +61,8 @@ public class LogMessageIfSonarScimEnabledPresentPropertyTest { .hasSize(1) .containsExactly("'" + SONAR_SCIM_ENABLED + "' property is defined but not read anymore. Please read the upgrade notes" + " for the instruction to upgrade. User provisioning is deactivated until reactivated from the SonarQube" + - " Administration Interface (\"General->Authentication\")."); + " Administration Interface (\"General->Authentication\"). " + + "See documentation: https://docs.sonarqube.org/10.1/instance-administration/authentication/saml/scim/overview/"); } @Test @@ -87,4 +88,4 @@ public class LogMessageIfSonarScimEnabledPresentPropertyTest { assertThat(logger.logs(LoggerLevel.WARN)).hasSize(2); } -} \ No newline at end of file +} -- 2.39.5