Gilad Chaplik has uploaded a new change for review.

Change subject: core: fix users quota check (#847511)
......................................................................

core: fix users quota check (#847511)

https://bugzilla.redhat.com/847511

quota check will be invoked in IsUserAutorizedToRunAction

Change-Id: Icc1298cabe3cc5e8895d31f473a76bb9ff7efdef
Signed-off-by: Gilad Chaplik <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
1 file changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/33/7133/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
index 4814218..d145ef6 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
@@ -688,6 +688,11 @@
         // Get identifiers and types of the objects whose permissions have to 
be
         // checked:
         final List<PermissionSubject> permSubjects = 
getPermissionCheckSubjects();
+
+        if (this instanceof Quotable) {
+            ((Quotable) this).addQuotaPermissionSubject(permSubjects);
+        }
+
         if (permSubjects == null || permSubjects.isEmpty()) {
             if (log.isDebugEnabled()) {
                 log.debugFormat("The set of objects to check is null or empty 
for action {0}.", getActionType());
@@ -1342,12 +1347,6 @@
         if (jobProperties == null) {
             jobProperties = new HashMap<String, String>();
             List<PermissionSubject> subjects = getPermissionCheckSubjects();
-            if (this instanceof Quotable) {
-                if (subjects == null) {
-                    subjects = new ArrayList<PermissionSubject>();
-                }
-                ((Quotable) this).addQuotaPermissionSubject(subjects);
-            }
             if (!subjects.isEmpty()) {
                 VdcObjectType entityType;
                 Guid entityId;


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

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

Reply via email to