Yair Zaslavsky has submitted this change and it was merged. Change subject: fix handling of admin user while login ......................................................................
fix handling of admin user while login GetAllRolesByUserIdAndGroupIds was called whenever a user was logged in in order to find out if the user is an admin or not. In original code, all roles were retrieved and the check for the admin role type was done in a loop inside the MultiLevelAdministrationHandler::isAdminUser() code. Since the required functionality is only to find if any admin role is attached to the logging user, I had changed the SP code to return only one role (if exists) and have the role_type checked in the SP level. SP name and DAO method names were changed to match the real functionality. Change-Id: I6aa489199c904008e46a650f11877091931ee5de Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1156465 Signed-off-by: Eli Mesika <emes...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MultiLevelAdministrationHandler.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/RoleDAO.java M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/RoleDAODbFacadeImpl.java M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/RoleDAOTest.java M packaging/dbscripts/multi_level_administration_sp.sql 5 files changed, 30 insertions(+), 34 deletions(-) Approvals: Martin Peřina: Looks good to me, but someone else must approve Eli Mesika: Verified Vojtech Szocs: Looks good to me, but someone else must approve Yair Zaslavsky: Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/34551 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6aa489199c904008e46a650f11877091931ee5de Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches