Add user role check up when it's getting dataset profiles for the manager listing
This commit is contained in:
parent
f01e89799b
commit
6a2099c2b9
|
@ -102,7 +102,8 @@ public class DatasetProfileManager {
|
|||
if (principal.getAuthz().contains(Authorities.ADMIN)) {
|
||||
authItems = items;
|
||||
} else if (principal.getAuthz().contains(Authorities.DATASET_PROFILE_MANAGER)) {
|
||||
authItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getAuthenticated(items, principal.getId(), null);
|
||||
List<Integer> roles = Collections.singletonList(1);
|
||||
authItems = apiContext.getOperationsContext().getDatabaseRepository().getDatasetProfileDao().getAuthenticated(items, principal.getId(), roles);
|
||||
}
|
||||
QueryableList<DatasetProfile> pagedItems = PaginationManager.applyPaging(authItems, datasetProfileTableRequestItem);
|
||||
List<DatasetProfileListingModel> datasetProfiles = pagedItems.select(item -> new DatasetProfileListingModel().fromDataModel(item));
|
||||
|
|
Loading…
Reference in New Issue