Skip to content

Commit

Permalink
Bugfix and new minor release
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 26, 2024
1 parent c803372 commit dabe8c1
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion account-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>account-gui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion myconext-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>myconext-gui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion myconext-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>myconext-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,10 @@ private ResponseEntity<UserResponse> returnUserResponse(User user) {
private ResponseEntity<UserResponse> userResponseRememberMe(User user) {
List<SamlAuthenticationRequest> samlAuthenticationRequests = authenticationRequestRepository.findByUserIdAndRememberMe(user.getId(), true);
Optional<Registration> 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);
}
Expand Down
4 changes: 1 addition & 3 deletions myconext-server/src/main/java/myconext/model/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,7 @@ public boolean reconcileLinkedAccounts() {
if (!preferredInstitution) {
Optional<ProvisionedLinkedAccount> 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;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
<packaging>pom</packaging>
<name>myconext</name>
<description>My OpenConext</description>
Expand Down
2 changes: 1 addition & 1 deletion public-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>public-gui</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tiqr-mock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.openconext</groupId>
<artifactId>myconext</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>tiqr-mock</artifactId>
Expand Down

0 comments on commit dabe8c1

Please sign in to comment.