weizhouapache commented on a change in pull request #4145:
URL: https://github.com/apache/cloudstack/pull/4145#discussion_r439999565
##########
File path: server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
##########
@@ -781,7 +781,8 @@
Pair<List<UserVmJoinVO>, Integer> result =
searchForUserVMsInternal(cmd);
ListResponse<UserVmResponse> response = new
ListResponse<UserVmResponse>();
ResponseView respView = ResponseView.Restricted;
- if (cmd instanceof ListVMsCmdByAdmin) {
+ Account caller = CallContext.current().getCallingAccount();
+ if (_accountMgr.isAdmin(caller.getId())) {
Review comment:
@davidjumani it should be isRootAdmin instead of isAdmin
----------------------------------------------------------------
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]