Fixes bug on DMP listing backend logic that exposes deleted Datasets.
This commit is contained in:
parent
5b6936c25e
commit
1747e62a58
|
@ -96,10 +96,13 @@ public class DataManagementPlanManager {
|
|||
.selectAsync(item -> {
|
||||
item.setDataset(
|
||||
item.getDataset().stream()
|
||||
.filter(ds -> !ds.getStatus().equals(Dataset.Status.DELETED.getValue())).collect(Collectors.toList()).stream()
|
||||
.filter(dataset -> dataset.getDmp().getCreator().getId().equals(principalID)
|
||||
|| dataset.isPublic()
|
||||
|| dataset.getDmp().getUsers().stream()
|
||||
.filter(x -> x.getUser().getId().equals(principalID)).collect(Collectors.toList()).size() > 0).collect(Collectors.toSet()));
|
||||
|| dataset.isPublic()
|
||||
|| dataset.getDmp().getUsers().stream()
|
||||
.filter(x -> x.getUser().getId().equals(principalID))
|
||||
.collect(Collectors.toList()).size() > 0)
|
||||
.collect(Collectors.toSet()));
|
||||
return new DataManagementPlanListingModel().fromDataModelDatasets(item);
|
||||
})
|
||||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||
|
|
Loading…
Reference in New Issue