Change in ovirt-engine[ovirt-engine-3.5]: core:fix handling of admin user while login

oourfali at redhat.com oourfali at redhat.com
Mon Nov 17 09:18:37 UTC 2014


Oved Ourfali has submitted this change and it was merged.

Change subject: core:fix handling of admin user while login
......................................................................


core: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 <emesika at 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(+), 36 deletions(-)

Approvals:
  Eli Mesika: Verified
  Oved Ourfali: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6aa489199c904008e46a650f11877091931ee5de
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list