Change in ovirt-engine-sdk[sdk_3.5]: codegen: Apply filter by name/alias after get

juan.hernandez at redhat.com juan.hernandez at redhat.com
Tue Nov 11 11:03:16 UTC 2014


Juan Hernandez has submitted this change and it was merged.

Change subject: codegen: Apply filter by name/alias after get
......................................................................


codegen: Apply filter by name/alias after get

Currently, for searchable collections, the "get" method is implemented
using the "search" query parameter, and returning to the caller all the
results returned by the server. But when this is combined with the
"Filter: true" header the server ignores the "search" query parameter,
and instead it returns all the objects that the user has permissions
for. This means that in some situations the user may be requesting an
object and getting back a different one. To avoid this issue this patch
adds an additional filtering step, so the collection returned by the
server is filtered, and only the objects matching the name given by the
user are taken into consideration.

Change-Id: Ia762356ee4ad12839e089de2cd60f832bd212af5
Related-To: https://bugzilla.redhat.com/1155678
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
(cherry picked from commit 6f076f7fb76373c5fc64cf90687877f83318925b)
---
M generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetDisksTemplate
M generator/src/main/java/org/ovirt/engine/sdk/generator/rsdl/templates/CollectionGetSearchableTemplate
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia762356ee4ad12839e089de2cd60f832bd212af5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: sdk_3.5
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list