rhtyd commented on a change in pull request #4145:
URL: https://github.com/apache/cloudstack/pull/4145#discussion_r440578482
##########
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 yes, root admin. Check if `isAdmin` checks for only root
admin, or would it pass for domain admin. The fix needed here is to check if
caller is a root 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]