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 -> {
|
.selectAsync(item -> {
|
||||||
item.setDataset(
|
item.setDataset(
|
||||||
item.getDataset().stream()
|
item.getDataset().stream()
|
||||||
|
.filter(ds -> !ds.getStatus().equals(Dataset.Status.DELETED.getValue())).collect(Collectors.toList()).stream()
|
||||||
.filter(dataset -> dataset.getDmp().getCreator().getId().equals(principalID)
|
.filter(dataset -> dataset.getDmp().getCreator().getId().equals(principalID)
|
||||||
|| dataset.isPublic()
|
|| dataset.isPublic()
|
||||||
|| dataset.getDmp().getUsers().stream()
|
|| dataset.getDmp().getUsers().stream()
|
||||||
.filter(x -> x.getUser().getId().equals(principalID)).collect(Collectors.toList()).size() > 0).collect(Collectors.toSet()));
|
.filter(x -> x.getUser().getId().equals(principalID))
|
||||||
|
.collect(Collectors.toList()).size() > 0)
|
||||||
|
.collect(Collectors.toSet()));
|
||||||
return new DataManagementPlanListingModel().fromDataModelDatasets(item);
|
return new DataManagementPlanListingModel().fromDataModelDatasets(item);
|
||||||
})
|
})
|
||||||
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
.whenComplete((resultList, throwable) -> dataTable.setData(resultList));
|
||||||
|
|
Loading…
Reference in New Issue