diff --git a/account-gui/pom.xml b/account-gui/pom.xml
index 62d7dfae..51d4e284 100644
--- a/account-gui/pom.xml
+++ b/account-gui/pom.xml
@@ -4,7 +4,7 @@
org.openconext
myconext
- 7.3.6
+ 7.3.7
../pom.xml
account-gui
diff --git a/myconext-gui/pom.xml b/myconext-gui/pom.xml
index 547fce27..6a741135 100644
--- a/myconext-gui/pom.xml
+++ b/myconext-gui/pom.xml
@@ -4,7 +4,7 @@
org.openconext
myconext
- 7.3.6
+ 7.3.7
../pom.xml
myconext-gui
diff --git a/myconext-server/pom.xml b/myconext-server/pom.xml
index cd343f45..79e2f8b1 100644
--- a/myconext-server/pom.xml
+++ b/myconext-server/pom.xml
@@ -4,7 +4,7 @@
org.openconext
myconext
- 7.3.6
+ 7.3.7
../pom.xml
myconext-server
diff --git a/myconext-server/src/main/java/myconext/api/UserController.java b/myconext-server/src/main/java/myconext/api/UserController.java
index 093bd5e4..0c09a975 100644
--- a/myconext-server/src/main/java/myconext/api/UserController.java
+++ b/myconext-server/src/main/java/myconext/api/UserController.java
@@ -730,6 +730,10 @@ private ResponseEntity returnUserResponse(User user) {
private ResponseEntity userResponseRememberMe(User user) {
List samlAuthenticationRequests = authenticationRequestRepository.findByUserIdAndRememberMe(user.getId(), true);
Optional optionalRegistration = registrationRepository.findRegistrationByUserId(user.getId());
+ //Run-time migrate inconsistent state for none of the (external)linkedAccounts being the preferred one - idempotent
+ if (user.reconcileLinkedAccounts()) {
+ userRepository.save(user);
+ }
UserResponse userResponse = new UserResponse(user, user.convertEduIdPerServiceProvider(this.servicesConfiguration), optionalRegistration, !samlAuthenticationRequests.isEmpty(), manage, issuers);
return ResponseEntity.ok(userResponse);
}
diff --git a/myconext-server/src/main/java/myconext/model/User.java b/myconext-server/src/main/java/myconext/model/User.java
index 59af090e..5a186f6b 100644
--- a/myconext-server/src/main/java/myconext/model/User.java
+++ b/myconext-server/src/main/java/myconext/model/User.java
@@ -369,9 +369,7 @@ public boolean reconcileLinkedAccounts() {
if (!preferredInstitution) {
Optional first = provisionedLinkedAccounts.stream()
.max(Comparator.comparing(ProvisionedLinkedAccount::getCreatedAt));
- first.ifPresent(provisionedLinkedAccount -> {
- provisionedLinkedAccount.setPreferred(true);
- });
+ first.ifPresent(provisionedLinkedAccount -> provisionedLinkedAccount.setPreferred(true));
return first.isPresent();
}
return false;
diff --git a/pom.xml b/pom.xml
index 77669f65..47cd6ce2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
org.openconext
myconext
- 7.3.6
+ 7.3.7
pom
myconext
My OpenConext
diff --git a/public-gui/pom.xml b/public-gui/pom.xml
index ed7ba39f..b6c4da10 100644
--- a/public-gui/pom.xml
+++ b/public-gui/pom.xml
@@ -4,7 +4,7 @@
org.openconext
myconext
- 7.3.6
+ 7.3.7
../pom.xml
public-gui
diff --git a/tiqr-mock/pom.xml b/tiqr-mock/pom.xml
index f8233c9c..6f527935 100644
--- a/tiqr-mock/pom.xml
+++ b/tiqr-mock/pom.xml
@@ -4,7 +4,7 @@
org.openconext
myconext
- 7.3.6
+ 7.3.7
../pom.xml
tiqr-mock