Fix: Resolve Username Case Sensitivity Issue in Login Flow (#1070)

* Fix: Username changing

The only situation where the username must be unique is when changing the username.

* Update UserController.java
This commit is contained in:
Ludy
2024-04-14 23:07:03 +02:00
committed by GitHub
parent 032388a8e3
commit ace4e200b1
6 changed files with 22 additions and 17 deletions

View File

@@ -38,7 +38,7 @@ public class InitialSecuritySetup {
initialUsername, initialPassword, Role.ADMIN.getRoleId(), true);
}
}
if (!userService.usernameExists(Role.INTERNAL_API_USER.getRoleId())) {
if (!userService.usernameExistsIgnoreCase(Role.INTERNAL_API_USER.getRoleId())) {
userService.saveUser(
Role.INTERNAL_API_USER.getRoleId(),
UUID.randomUUID().toString(),