Daniel Erez has uploaded a new change for review.

Change subject: core: mark GetVirtioScsiControllers as user query
......................................................................

core: mark GetVirtioScsiControllers as user query

Marking GetVirtioScsiControllers query as VdcQueryAuthType.User
since it's being used by the user portal.

Change-Id: I268b39bc85525a270998c10b67c2463a45a08a26
Bug-Url: https://bugzilla.redhat.com/1016826
Signed-off-by: Daniel Erez <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVirtioScsiControllersQuery.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
3 files changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/38/20038/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVirtioScsiControllersQuery.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVirtioScsiControllersQuery.java
index 5c85d8c..6212c50 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVirtioScsiControllersQuery.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetVirtioScsiControllersQuery.java
@@ -11,6 +11,7 @@
 
     @Override
     protected void executeQueryCommand() {
-        
getQueryReturnValue().setReturnValue(VmDeviceUtils.getVirtioScsiControllers(getParameters().getId()));
+        
getQueryReturnValue().setReturnValue(VmDeviceUtils.getVirtioScsiControllers(getParameters().getId(),
+                getUserID(), getParameters().isFiltered()));
     }
 }
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
index 0613207..363ccb6 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
@@ -1001,7 +1001,11 @@
     }
 
     public static List<VmDevice> getVirtioScsiControllers(Guid vmId) {
+        return getVirtioScsiControllers(vmId, null, false);
+    }
+
+    public static List<VmDevice> getVirtioScsiControllers(Guid vmId, Guid 
userID, boolean isFiltered) {
         return dao.getVmDeviceByVmIdTypeAndDevice(
-                vmId, VmDeviceGeneralType.CONTROLLER, 
VmDeviceType.VIRTIOSCSI.getName());
+                vmId, VmDeviceGeneralType.CONTROLLER, 
VmDeviceType.VIRTIOSCSI.getName(), userID, isFiltered);
     }
 }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
index a7af96f..78e3b3e 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
@@ -20,7 +20,7 @@
     GetSoundDevices(VdcQueryAuthType.User),
     GetVmsByVnicProfileId,
     GetTemplatesByVnicProfileId,
-    GetVirtioScsiControllers,
+    GetVirtioScsiControllers(VdcQueryAuthType.User),
 
     // Vds queries
     GetVdsByVdsId,


-- 
To view, visit http://gerrit.ovirt.org/20038
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I268b39bc85525a270998c10b67c2463a45a08a26
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Daniel Erez <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to