aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBelen Pruvost <belen.pruvost@sonarsource.com>2022-02-07 10:55:52 -0300
committersonartech <sonartech@sonarsource.com>2022-02-07 20:02:53 +0000
commitfbb04206acda07bbc93cfd36505878d53e658bf0 (patch)
treea0c5e4a419674742dc11fa58d4af9c48cf6af1aa
parentd936cd7312506d674c71d650920bd6a4471ddb18 (diff)
downloadsonarqube-fbb04206acda07bbc93cfd36505878d53e658bf0.tar.gz
sonarqube-fbb04206acda07bbc93cfd36505878d53e658bf0.zip
[NO-JIRA] Improving logs for when a user is added to a group
-rw-r--r--server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java b/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java
index 84b6fc74481..0a7c66a1f9b 100644
--- a/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java
+++ b/server/sonar-webserver-auth/src/main/java/org/sonar/server/authentication/UserRegistrarImpl.java
@@ -203,7 +203,7 @@ public class UserRegistrarImpl implements UserRegistrar {
private void addGroups(DbSession dbSession, UserDto userDto, Collection<String> groupsToAdd, Map<String, GroupDto> groupsByName) {
groupsToAdd.stream().map(groupsByName::get).filter(Objects::nonNull).forEach(
groupDto -> {
- LOGGER.debug("Adding group '{}' to user '{}'", groupDto.getName(), userDto.getLogin());
+ LOGGER.debug("Adding user '{}' to group '{}'", userDto.getLogin(), groupDto.getName());
dbClient.userGroupDao().insert(dbSession, new UserGroupDto().setGroupUuid(groupDto.getUuid()).setUserUuid(userDto.getUuid()),
groupDto.getName(), userDto.getLogin());
});
@@ -250,7 +250,7 @@ public class UserRegistrarImpl implements UserRegistrar {
}
private static UserDto[] toArray(Optional<UserDto> userDto) {
- return userDto.map(u -> new UserDto[] {u}).orElse(new UserDto[] {});
+ return userDto.map(u -> new UserDto[]{u}).orElse(new UserDto[]{});
}
private static AuthenticationException generateExistingEmailError(UserRegistration authenticatorParameters, String email) {