use of com.emc.storageos.model.BulkRestRep in project coprhd-controller by CoprHD.
the class TaggedResource method getBulkResources.
protected BulkRestRep getBulkResources(List<URI> ids) {
StorageOSUser user = getUserFromContext();
BulkRestRep ret = null;
if (ids.size() > _maxBulkSize) {
throw APIException.badRequests.exceedingLimit("bulk size", _maxBulkSize);
}
// -sysadmin (if zone level resource or resource is system admin readable)
if (_permissionsHelper.userHasGivenRole(user, null, Role.SYSTEM_MONITOR) || ((isZoneLevelResource() || isSysAdminReadableResource()) && _permissionsHelper.userHasGivenRole(user, null, Role.SYSTEM_ADMIN))) {
_log.info("Bulk of {} for sysmonitor/sysadmin", getResourceClass().getSimpleName());
ret = queryBulkResourceReps(ids);
} else {
_log.info("Bulk of {} for user", getResourceClass().getSimpleName());
ret = queryFilteredBulkResourceReps(ids);
}
return ret;
}
Aggregations