RED-7140: get userId before async method
This commit is contained in:
parent
883cee61c5
commit
33638c2b5e
@ -199,8 +199,8 @@ public class DownloadController implements DownloadResource {
|
||||
@PreAuthorize("hasAuthority('" + PROCESS_DOWNLOAD + "')")
|
||||
public CompletableFuture<ResponseEntity<InputStreamResource>> downloadFile(@RequestParam(STORAGE_ID) String storageId,
|
||||
@RequestParam(value = "inline", required = false, defaultValue = FALSE) boolean inline) {
|
||||
var userId = KeycloakSecurity.getUserId();
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
var userId = KeycloakSecurity.getUserId();
|
||||
|
||||
var downloadStatus = getDownloadStatus(storageId, userId);
|
||||
var fileDownloadStream = getFileForDownload(storageId, userId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user