Skip to content

Commit

Permalink
fixed the dataset permissions field query by the listDataset is null
Browse files Browse the repository at this point in the history
  • Loading branch information
ywy2090 committed Sep 2, 2024
1 parent 0e5f6d4 commit dd468ec
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,16 @@ public ListDatasetResponse listDataset(
startTime,
endTime);

if (!datasetList.isEmpty()) {
for (Dataset dataset : datasetList) {
String datasetId = dataset.getDatasetId();
DatasetUserPermissions datasetUserPermissions =
DatasetUserPermissionValidator.confirmUserDatasetPermissions(
datasetId, userInfo, datasetPermissionMapper, false);
dataset.setPermissions(datasetUserPermissions);
}
}

long totalCount = new PageInfo<>(datasetList).getTotal();
long pageEndOffset = (long) pageNum * pageSize;
boolean isLast = (pageEndOffset >= totalCount);
Expand Down

0 comments on commit dd468ec

Please sign in to comment.