Skip to content

Commit

Permalink
Restoring Spring 4 compatibly. (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
onukristo authored Oct 31, 2024
1 parent 3d9d10d commit 881fc61
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Changed

- Restoring Spring 4 compatibly.

## 1.45.0 - 2024/10/30

### Changed

- Context switches are reduced.
- MDC values are cleared more aggressively.

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=1.45.0
version=1.45.1
org.gradle.internal.http.socketTimeout=120000
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.authentication.AuthenticationServiceException;
import org.springframework.security.core.Authentication;
Expand Down Expand Up @@ -203,7 +202,7 @@ public ResponseEntity<GetTasksStuckResponse> getTasksStuck(@RequestBody(required
@Override
public ResponseEntity<GetTaskTypesResponse> getTaskTypes(@RequestParam(name = "status", required = false) List<String> status) {
if (!tasksProperties.getTasksManagement().isEnableGetTaskTypes()) {
return ResponseEntity.status(HttpStatus.GONE).build();
return ResponseEntity.status(410).build();
}
return callWithAuthentication(() -> {
ITasksManagementService.GetTaskTypesResponse serviceResponse = tasksManagementService.getTaskTypes(status);
Expand All @@ -222,7 +221,7 @@ protected <T> T callWithAuthentication(Set<String> roles, Function<Authenticatio
final Authentication auth = getAuthenticationIfAllowed(roles);

if (auth == null) {
return (T) ResponseEntity.status(HttpStatus.FORBIDDEN.value()).build();
return (T) ResponseEntity.status(403).build();
}

return fun.apply(auth);
Expand Down

0 comments on commit 881fc61

Please sign in to comment.