You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/12/16 08:55:48 UTC

[GitHub] [cloudstack] GabrielBrascher commented on a change in pull request #5114: Display all volumes to root admin

GabrielBrascher commented on a change in pull request #5114:
URL: https://github.com/apache/cloudstack/pull/5114#discussion_r770336192



##########
File path: server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
##########
@@ -2083,8 +2084,15 @@
         if (clusterId != null) {
             sc.setParameters("clusterId", clusterId);
         }
-        // Don't return DomR and ConsoleProxy volumes
-        sc.setParameters("type", VirtualMachine.Type.ConsoleProxy, VirtualMachine.Type.SecondaryStorageVm, VirtualMachine.Type.DomainRouter);
+
+        sc.setParameters("type", VirtualMachine.Type.User);
+
+        // Display all volumes for ROOT admin
+        if (forSystemVms != null && forSystemVms && caller.getType() == Account.ACCOUNT_TYPE_ADMIN) {

Review comment:
       +1 on @nvazquez suggestions, it looks like a simple way of improving the code.




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org