Skip to content

Fix null username passed to addUserToGroup and refactor addUser username resolution#471

Merged
pathob merged 1 commit intomainfrom
fix/user-groups-map
May 8, 2026
Merged

Fix null username passed to addUserToGroup and refactor addUser username resolution#471
pathob merged 1 commit intomainfrom
fix/user-groups-map

Conversation

@pathob
Copy link
Copy Markdown
Contributor

@pathob pathob commented May 8, 2026

When updating a user with groups but no username in the request body, null was passed to Crowd's addUserToGroup, causing "name argument cannot be null". Fixed by using user.getName() instead of userModel.getUsername().

Also resolved a pre-existing bug in addUser where findUser was called before the null-check of username, and removed the mutation of the incoming UserModel.

…ame resolution

When updating a user with groups but no username in the request body, null was passed
to Crowd's addUserToGroup, causing "name argument cannot be null". Fixed by using
user.getName() instead of userModel.getUsername().

Also resolved a pre-existing bug in addUser where findUser was called before the
null-check of username, and removed the mutation of the incoming UserModel.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@pathob pathob merged commit 49e4623 into main May 8, 2026
8 of 9 checks passed
@pathob pathob deleted the fix/user-groups-map branch May 8, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant