view hypervisor details rest api should be allowed for non-admins
The current call to show hypervisor is broken and expects the
user to have admin privileges always.It does not allow non-
admin users to view hypervisor details. This should be
controlled based on the rule defined in the policy.json rather
than have the permissions mandated programmatically. This bug
is caused due to regression and was working earlier.So the
changes proposed here is merely retaining the older behavior.
To ensure that this works as before, the context passed to the
db api layer is elevated so that it passes the requires_admin_
context check that is present in the db layer.
Change-Id: I50437788aac72608998cf9c24d4d562b1ff20301
Closes-Bug: 1447084
(cherry picked from commit 6be11856c6ac1cbd611cea894a0e26165ee5c5a5)
Reviewed: https:/ /review. openstack. org/178059 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=cbf606bdba6 21bbdf940fac7c8 c3fbc40d0f12b8
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit cbf606bdba621bb df940fac7c8c3fb c40d0f12b8
Author: Divya <email address hidden>
Date: Thu Apr 23 09:38:52 2015 +0200
view hypervisor details rest api should be allowed for non-admins
The current call to show hypervisor is broken and expects the
user to have admin privileges always.It does not allow non-
admin users to view hypervisor details. This should be
controlled based on the rule defined in the policy.json rather
than have the permissions mandated programmatically. This bug
is caused due to regression and was working earlier.So the
changes proposed here is merely retaining the older behavior.
To ensure that this works as before, the context passed to the
db api layer is elevated so that it passes the requires_admin_
context check that is present in the db layer.
Change-Id: I50437788aac726 08998cf9c24d4d5 62b1ff20301 d611cea894a0e26 165ee5c5a5)
Closes-Bug: 1447084
(cherry picked from commit 6be11856c6ac1cb