Itamar Heim has submitted this change and it was merged.
Change subject: core, restapi: Fix add permissions
......................................................................
core, restapi: Fix add permissions
The refactoring of the authentication mechanism introduced two different
identifiers for users and groups: one used internally by the engine and
one used by the external directory. The RESTAPI wasn't correctly
handling requests to add permissions when the provided identifier was
the internal one. The patch fixes the RESTAPI and the backend so that
they will accept both identifiers when adding users or groups.
Change-Id: I0d05c4bf4ebd242fd3a01a2f9a8d679f687c4982
Bug-Url:
https://bugzilla.redhat.com/1064829
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
(cherry picked from commit 072cc1f4c3495b75f344688c9b28691875a12f88)
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddPermissionCommand.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DbGroupDAO.java
M
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DbGroupDAODbFacadeImpl.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DbUserDAO.java
M
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DbUserDAODbFacadeImpl.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAssignedPermissionsResource.java
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/GroupMapper.java
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/PermissionMapper.java
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/UserMapper.java
M
backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/PermissionMapperTest.java
10 files changed, 335 insertions(+), 80 deletions(-)
Approvals:
Juan Hernandez: Verified
Yair Zaslavsky: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/25083
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0d05c4bf4ebd242fd3a01a2f9a8d679f687c4982
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server