weizhouapache commented on a change in pull request #5866:
URL: https://github.com/apache/cloudstack/pull/5866#discussion_r784881133



##########
File path: server/src/main/java/com/cloud/usage/UsageServiceImpl.java
##########
@@ -255,9 +222,7 @@ public boolean generateUsageRecords(GenerateUsageRecordsCmd 
cmd) {
         SearchCriteria<UsageVO> sc = _usageDao.createSearchCriteria();
 
         if (accountId != -1 && accountId != Account.ACCOUNT_ID_SYSTEM && 
!ignoreAccountId) {
-            // account exists and either domain on user role
-            // If not recursive and the account belongs to the user/domain 
admin, or the account was passed in, filter
-            if ((accountId == caller.getId() && !cmd.isRecursive()) || 
cmd.getAccountId() != null){
+            if ((accountId == caller.getId() && !cmd.isRecursive()) || 
cmd.getAccountId() != null || projectRequested){

Review comment:
       @DaanHoogland 
   `accountId == caller.getId()` does not make sense




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to