rhtyd commented on a change in pull request #4717:
URL: https://github.com/apache/cloudstack/pull/4717#discussion_r580036253



##########
File path: server/src/main/java/com/cloud/usage/UsageServiceImpl.java
##########
@@ -248,7 +248,17 @@ public boolean 
generateUsageRecords(GenerateUsageRecordsCmd cmd) {
             sc.addAnd("domainId", SearchCriteria.Op.IN, domainIds.toArray());
         }
 
-        if (domainId != null) {
+        if (cmd.isRecursive() && domainId != null){

Review comment:
       Look at for reference 
https://github.com/apache/cloudstack/blob/master/server/src/main/java/com/cloud/api/query/QueryManagerImpl.java#L872
   
   Expected test if an account is allowed or disallowed to get usage records of 
other domains (with/without recursive flag), and allowed to recursively get all 
usage records for a permitted account/domain.




----------------------------------------------------------------
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:
[email protected]


Reply via email to