ustcweizhou commented on a change in pull request #3378: project id added in 
test
URL: https://github.com/apache/cloudstack/pull/3378#discussion_r293378598
 
 

 ##########
 File path: server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
 ##########
 @@ -646,7 +646,12 @@
 
         Ternary<Long, Boolean, ListProjectResourcesCriteria> 
domainIdRecursiveListProject = new Ternary<Long, Boolean, 
ListProjectResourcesCriteria>(cmd.getDomainId(), cmd.isRecursive(), null);
 
-        _accountMgr.buildACLSearchParameters(caller, null, 
cmd.getAccountName(), cmd.getProjectId(), permittedAccounts, 
domainIdRecursiveListProject, listAll, false);
+        Long projectId = cmd.getProjectId();
+        if (resourceType.equalsIgnoreCase("project") && projectId == null) {
+            projectId = Long.parseLong(resourceId);
 
 Review comment:
   @DaanHoogland 
   resourceId might be a uuid
   it is better to have check like 
   
https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java#L681
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to