diff options
author | Belen Pruvost <belen.pruvost@sonarsource.com> | 2022-02-07 10:55:52 -0300 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-02-07 20:02:53 +0000 |
commit | fbb04206acda07bbc93cfd36505878d53e658bf0 (patch) | |
tree | a0c5e4a419674742dc11fa58d4af9c48cf6af1aa | |
parent | d936cd7312506d674c71d650920bd6a4471ddb18 (diff) | |
download | sonarqube-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.java | 4 |
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) { |