Compare commits

...

5 Commits

Author SHA1 Message Date
f40eb6544d Merge pull request 'develop' () from develop into main
Reviewed-on: 
2025-03-31 13:41:00 +02:00
2ecdbf8d72 Merge pull request 'Removed manual check of email' () from manual-email-check into develop
Reviewed-on: 
2025-03-31 13:38:37 +02:00
316ca7c042 Removed manual check of email
New users would never be able to login because of the manual checking of email.
This has happened since the requirements and code has changed over time and we
missed the manual constraint.

This is related to the fix where we removed the database constraint.
2025-03-31 13:33:46 +02:00
a57d673c06 Merge pull request 'Remove email constratint' () from remove-email-constraint into develop
Reviewed-on: 
2025-03-31 12:32:11 +02:00
1853ecfcc3 Remove email constratint
eamil field had a unique constraint on it which had side effects.
2025-03-31 12:31:04 +02:00
2 changed files with 1 additions and 4 deletions
src/main/java/se/su/dsv/seshat

@ -25,7 +25,7 @@ public class AppUser {
@Column(nullable = false, unique = true)
private String username;
@Column(nullable = false, unique = true)
@Column(nullable = false)
private String email;
@Column(nullable = false)

@ -17,9 +17,6 @@ public class UserService {
if (appUserRepository.existsByUsername(username)) {
throw new IllegalArgumentException("Username already exists");
}
if (appUserRepository.existsByEmail(email)) {
throw new IllegalArgumentException("Email already exists");
}
AppUser newUser = new AppUser(username, email, "USER");
appUserRepository.save(newUser);