KEYCLOAK-7015: Not allowing two users to have empty string emails addrs.
This commit is contained in:
parent
871be4ad87
commit
d55ccf5312
2 changed files with 9 additions and 1 deletions
|
@ -195,6 +195,7 @@ public class UserResource {
|
|||
user.setUsername(rep.getUsername());
|
||||
}
|
||||
if (rep.getEmail() != null) user.setEmail(rep.getEmail());
|
||||
if (rep.getEmail() == "") user.setEmail(null);
|
||||
if (rep.getFirstName() != null) user.setFirstName(rep.getFirstName());
|
||||
if (rep.getLastName() != null) user.setLastName(rep.getLastName());
|
||||
|
||||
|
|
|
@ -325,6 +325,13 @@ public class UserTest extends AbstractAdminTest {
|
|||
|
||||
}
|
||||
|
||||
// KEYCLOAK-7015
|
||||
@Test
|
||||
public void createTwoUsersWithEmptyStringEmails() {
|
||||
createUser("user1", "");
|
||||
createUser("user2", "");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createUserWithFederationLink() {
|
||||
|
||||
|
|
Loading…
Reference in a new issue