Change in ovirt-engine[ovirt-engine-4.0.2]: restapi: Ignore failures fetching cluster policy

Piotr Kliczewski has submitted this change and it was merged. Change subject: restapi: Ignore failures fetching cluster policy ...................................................................... restapi: Ignore failures fetching cluster policy Currently when a cluster is fetched in version 3 of the API an additional query is performed to retrieve the details of its associated scheduling policy, as that is how it used to work. But this additional query may require additional permissions for some users, and when this happens the complete cluster fetch fails. To alleviate that problem this patch changes the API so that failures to fetch the scheduling policy will just be ignored. As most users won't be interersted in those details this should solve most use cases. When a user without the required permissions fetches the cluster she will get only the reference, and not the details: GET /clusters Authorization: myuser@mydomain:... Filter: true <cluster id="123" href="/clusters/123"> ... <scheduling_policy id="456" href="/schedulingpolicies/456"/> ... </cluster> When the user has the required permissions he will get all the details of the scheduling policy. Change-Id: I23b0ef3830f8291d725fa8fce241c8e0c12309be Bug-Url: https://bugzilla.redhat.com/1364048 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> (cherry picked from commit 12fffe432e03396ed62e3984116df46ea7d78e5a) (cherry picked from commit 97e15182a9ad9b5a5d07a046d99e9b6c7f943765) --- M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/v3/adapters/V3ClusterOutAdapter.java 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Sandro Bonazzola: Verified; Looks good to me, approved Jenkins CI: Passed CI tests -- To view, visit https://gerrit.ovirt.org/62179 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I23b0ef3830f8291d725fa8fce241c8e0c12309be Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-4.0.2 Gerrit-Owner: Sandro Bonazzola <sbonazzo@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourfali@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski@gmail.com> Gerrit-Reviewer: Roy Golan <rgolan@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbonazzo@redhat.com> Gerrit-Reviewer: Tal Nisan <tnisan@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
piotr.kliczewski@gmail.com