Change in ovirt-engine[master]: restapi: Set 'filter=true' by default for non admins

From Martin Peřina <mperina@redhat.com>:
Martin Peřina has submitted this change and it was merged. Change subject: restapi: Set 'filter=true' by default for non admins ...................................................................... restapi: Set 'filter=true' by default for non admins The API supports the 'filter' parameter to indicate if results should be filtered according to the permissions of the user. Due to the way this is implemented, non admin users need to set this parameter for almost all operations, as the default value is 'false'. To simplify things for non admin users, this patch changes the default value to 'true', but only for non admin users. If the value is explicitly given in a request it will be honored. This is a backwards compatibility breaking change, as clients that used non admin users and did *not* provide explicitly the 'filter' parameter will start to behave differently. However, this is unlikely, as calls from non admin users without the 'filter=true' is almost useless. For those unlikely cases where this may be a problem, the patch also introduces a new 'ENGINE_API_FILTER_BY_DEFAUL' configuration parameter: # # This flags indicates if 'filtering' should be enabled by default for # users that aren't administartors. # ENGINE_API_FILTER_BY_DEFAULT="true" If it is necessary to revert to the behaviour of previous versions of the engine, it can be achieved by changing this parameter in a configuration file inside the '/etc/ovirt-engine/engine.conf.d' directory. For example: # echo 'ENGINE_API_FILTER_BY_DEFAULT="true"' > \ /etc/ovirt-engine/engine.conf.d/99-filter-by-default.conf # systemctl restart ovirt-engine Change-Id: I14d2e1101c32727f880ca8c82d48eb65fca9b8c2 Bug-Url: https://bugzilla.redhat.com/1420310 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/LocalConfig.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BaseBackendResource.java M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/ParametersHelper.java M packaging/services/ovirt-engine/ovirt-engine.conf.in 4 files changed, 33 insertions(+), 5 deletions(-) Approvals: Ondra Machacek: Looks good to me, but someone else must approve Martin Peřina: Looks good to me, approved Juan Hernandez: Verified Daniel Erez: Looks good to me, but someone else must approve Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/73039 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I14d2e1101c32727f880ca8c82d48eb65fca9b8c2 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Martin Peřina <mperina@redhat.com> Gerrit-Reviewer: Ondra Machacek <omachace@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
Code Review