Oved Ourfali has submitted this change and it was merged.
Change subject: rest: User can't see its permissions (#868304)
......................................................................
rest: User can't see its permissions (#868304)
https://bugzilla.redhat.com/868304
When asking for object permissions in the REST API, we call search
query, to get all users.
This patch changes that to only fetch for users relevant for the
permission itself, doing that using GetDbUserById query, and also making
it a user query to allow users to view permissions on their objects.
Change-Id: I6f21f4b8a845d52276dd7d97b5c7069892bb3b77
Signed-off-by: Oved Ourfali <oourfali(a)redhat.com>
---
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
M
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAssignedPermissionsResource.java
M
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendAssignedPermissionsResourceTest.java
M
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendEntityAssignedPermissionsResourceTest.java
M
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendGroupAssignedPermissionsResourceTest.java
M
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendUserAssignedPermissionsResourceTest.java
6 files changed, 44 insertions(+), 30 deletions(-)
Approvals:
Oved Ourfali: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/8720
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6f21f4b8a845d52276dd7d97b5c7069892bb3b77
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpastern(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>