From 6c1bb2ac26ac3d13c607507c66a0769ba6155d46 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 25 Jan 2016 17:00:36 +0100 Subject: [PATCH] SONAR-7219 Remove sonar.security.updateUserAttributes property --- .../src/main/webapp/WEB-INF/lib/need_authentication.rb | 2 +- .../org/sonar/core/config/CorePropertyDefinitions.java | 7 ------- .../org/sonar/core/config/CorePropertyDefinitionsTest.java | 2 +- .../src/main/java/org/sonar/api/CoreProperties.java | 2 ++ 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/server/sonar-web/src/main/webapp/WEB-INF/lib/need_authentication.rb b/server/sonar-web/src/main/webapp/WEB-INF/lib/need_authentication.rb index 86c07064133..b3fb607fa07 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/lib/need_authentication.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/lib/need_authentication.rb @@ -148,7 +148,7 @@ class PluginRealm end else # Existing user - if details && Api::Utils.java_facade.getSettings().getBoolean('sonar.security.updateUserAttributes') + if details user.name = details.getName() user.email = details.getEmail() end diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java index 1a4af6cd409..4a6cacffb4e 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java +++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java @@ -133,13 +133,6 @@ public class CorePropertyDefinitions { .defaultValue(String.valueOf(true)) .hidden() .build(), - PropertyDefinition.builder(CoreProperties.CORE_AUTHENTICATOR_UPDATE_USER_ATTRIBUTES) - .name("Update user attributes") - .description("When using the LDAP or OpenID plugin, at each login, the user attributes (name, email, ...) are re-synchronized") - .hidden() - .type(PropertyType.BOOLEAN) - .defaultValue(String.valueOf(true)) - .build(), PropertyDefinition.builder(CoreProperties.CORE_AUTHENTICATOR_IGNORE_STARTUP_FAILURE) .name("Ignore failures during authenticator startup") .type(PropertyType.BOOLEAN) diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java index c5c39d3fb0f..4e3e2550cde 100644 --- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java @@ -29,6 +29,6 @@ public class CorePropertyDefinitionsTest { @Test public void all() { List defs = CorePropertyDefinitions.all(); - assertThat(defs.size()).isGreaterThan(10); + assertThat(defs.size()).isGreaterThan(9); } } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java index c2dead92935..457d19caa02 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java @@ -242,7 +242,9 @@ public interface CoreProperties { /** * @since 3.6 + * @deprecated since 5.4. This feature is not supported anymore. See http://jira.sonarsource.com/browse/SONAR-7219 */ + @Deprecated String CORE_AUTHENTICATOR_UPDATE_USER_ATTRIBUTES = "sonar.security.updateUserAttributes"; String SERVER_VERSION = "sonar.core.version"; -- 2.39.5