Pearl1594 commented on a change in pull request #6111:
URL: https://github.com/apache/cloudstack/pull/6111#discussion_r826978262
##########
File path:
api/src/main/java/org/apache/cloudstack/api/BaseListDomainResourcesCmd.java
##########
@@ -42,7 +45,10 @@ public boolean listAll() {
@Override
public boolean isRecursive() {
if (listAll()) {
- return recursive == null ? true : recursive;
+ Account caller = CallContext.current().getCallingAccount();
+ if (caller.getType() != Account.Type.NORMAL) {
+ return recursive == null ? true : recursive;
Review comment:
Could be simplified to
```suggestion
return recursive == null || recursive;
```
##########
File path:
api/src/main/java/org/apache/cloudstack/api/BaseListDomainResourcesCmd.java
##########
@@ -42,7 +45,10 @@ public boolean listAll() {
@Override
public boolean isRecursive() {
if (listAll()) {
- return recursive == null ? true : recursive;
+ Account caller = CallContext.current().getCallingAccount();
+ if (caller.getType() != Account.Type.NORMAL) {
+ return recursive == null ? true : recursive;
+ }
}
return recursive == null ? false : recursive;
Review comment:
Could probably be simplified to:
```suggestion
return recursive != null && recursive;
```
--
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]