Spaceman1984 commented on a change in pull request #4717:
URL: https://github.com/apache/cloudstack/pull/4717#discussion_r580265549
##########
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:
While testing I found that users cannot call this API, but domain admins
can. I have added a check, if an account id is specified, if it belongs to any
of the domains of the calling domain admin.
----------------------------------------------------------------
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]