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