Fix authorization issue with Dataset Templates not showing to their original creators (that are not Admins)

This commit is contained in:
George Kalampokis 2022-05-31 16:14:25 +03:00
parent 03f7afede8
commit e8a87765ee
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ public class DatasetProfileManager {
if (principal.getAuthz().contains(Authorities.ADMIN)) {
authItems = items;
} else if (principal.getAuthz().contains(Authorities.DATASET_PROFILE_MANAGER)) {
List<Integer> roles = Collections.singletonList(1);
List<Integer> roles = Arrays.asList(0, 1);
authItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getAuthenticated(items, principal.getId(), roles);
}
QueryableList<DatasetProfile> pagedItems = PaginationManager.applyPaging(authItems, datasetProfileTableRequestItem);