fix: updated the code to fetch all workspaces without the user session context (#39787)
This commit is contained in:
parent
9a48da4436
commit
80eefe7825
|
|
@ -159,8 +159,8 @@ public class PluginServiceCEImpl extends BaseService<PluginRepository, Plugin, S
|
|||
if (newWorkspacePlugins.isEmpty()) {
|
||||
return Flux.empty();
|
||||
}
|
||||
|
||||
return workspaceService.getAll().flatMap(workspace -> {
|
||||
// used retrieveAll() as it does not need user session context
|
||||
return workspaceService.retrieveAll().flatMap(workspace -> {
|
||||
// Only perform a DB op if plugins associated to this org have changed
|
||||
if (workspace.getPlugins().containsAll(newWorkspacePlugins)) {
|
||||
return Mono.just(workspace);
|
||||
|
|
|
|||
|
|
@ -43,4 +43,6 @@ public interface WorkspaceServiceCE extends CrudService<Workspace, String> {
|
|||
Mono<Workspace> archiveById(String s);
|
||||
|
||||
Mono<String> getDefaultEnvironmentId(String workspaceId, AclPermission aclPermission);
|
||||
|
||||
Flux<Workspace> retrieveAll();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -618,4 +618,9 @@ public class WorkspaceServiceCEImpl extends BaseService<WorkspaceRepository, Wor
|
|||
public Flux<Workspace> getAll(AclPermission permission) {
|
||||
return repository.findAll(permission);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Flux<Workspace> retrieveAll() {
|
||||
return repository.retrieveAll();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user