Martin Betak has uploaded a new change for review.

Change subject: webadmin: Fix NPE in HostListModel when non-admin user logged in
......................................................................

webadmin: Fix NPE in HostListModel when non-admin user logged in

When non admin user logged in the hasAdminSystemPermission Boolean
was null and implicitly cast to primitive boolean.

Change-Id: Ibcfcb1cb6214066d718a720ca78c195f9512b143
Signed-off-by: Martin Betak <mbe...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/65/26665/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
index b26c7fb..b8c8983 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
@@ -2008,7 +2008,7 @@
         getConfigureLocalStorageCommand().setIsExecutionAllowed(items.size() 
== 1
                 && items.get(0).getStatus() == VDSStatus.Maintenance);
 
-        if (!hasAdminSystemPermission && 
getConfigureLocalStorageCommand().getIsExecutionAllowed()) {
+        if (!Boolean.TRUE.equals(hasAdminSystemPermission) && 
getConfigureLocalStorageCommand().getIsExecutionAllowed()) {
 
             
getConfigureLocalStorageCommand().getExecuteProhibitionReasons().add(ConstantsManager.getInstance()
                     .getConstants()


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

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

Reply via email to