Gilad Chaplik has uploaded a new change for review.

Change subject: userportal: quota permissions show extended view wrongfully
......................................................................

userportal: quota permissions show extended view wrongfully

In the userportal we show extended view if the user has other
permissions associated with him that are not included in user role.
'Consume Quota' is a user role and action group that is not included
in user role, therefore, in client side, we will add a check for
consume quota action group, and ignore/skip it.

Change-Id: I435bf61277bb77fd4e400ee738b74f71024f57d3
Bug-Url: https://bugzilla.redhat.com/905144
Signed-off-by: Gilad Chaplik <gchap...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/08/12008/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
index 9fb8301..5032211 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/userportal/UserPortalLoginModel.java
@@ -35,6 +35,7 @@
 public class UserPortalLoginModel extends LoginModel
 {
 
+    private static final int ConsumeQuotaActionGroup = 901;
     private UICommand privateChangePasswordCommand;
 
     public UICommand getChangePasswordCommand()
@@ -397,6 +398,10 @@
         {
             if 
(!loginModel.getENGINEUserActionGroupList().contains(actionGroup))
             {
+                // a user 'stays' a user if he has consume quota action group.
+                if (actionGroup.getId() == ConsumeQuotaActionGroup) {
+                    continue;
+                }
                 isENGINEUser = false;
                 break;
             }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I435bf61277bb77fd4e400ee738b74f71024f57d3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to