DaanHoogland commented on code in PR #11087:
URL: https://github.com/apache/cloudstack/pull/11087#discussion_r2166833801


##########
server/src/main/java/com/cloud/api/query/QueryManagerImpl.java:
##########
@@ -4274,15 +4219,16 @@ public ListResponse<ZoneResponse> 
listDataCenters(ListZonesCmd cmd) {
             respView = ResponseView.Full;
         }
 
-        List<ZoneResponse> dcResponses = 
ViewResponseHelper.createDataCenterResponse(respView, cmd.getShowCapacities(), 
cmd.getShowIcon(), result.first().toArray(new 
DataCenterJoinVO[result.first().size()]));
+        List<ZoneResponse> dcResponses = 
ViewResponseHelper.createDataCenterResponse(respView, cmd.getShowCapacities(), 
cmd.getShowIcon(), result.first().toArray(new DataCenterJoinVO[0]));
         response.setResponses(dcResponses, result.second());
         return response;
     }
 
     private Pair<List<DataCenterJoinVO>, Integer> 
listDataCentersInternal(ListZonesCmd cmd) {
         Account account = CallContext.current().getCallingAccount();
         Long domainId = cmd.getDomainId();
-        Long id = cmd.getId();
+        Long zoneId = cmd.getId();
+        zoneId = 
accountMgr.checkAccessAndSpecifyAuthority(CallContext.current().getCallingAccount(),
 zoneId);

Review Comment:
   for reviewer; this is the actual change. (i’ve been going overboard on 
cleanup during investigation)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to