Fix v2 API dataframes get policy check
oslo.policy expects the key project_id, not tenant_id anymore. This was causing the GET /v2/dataframes policy check to fail: $ openstack --rating-api-version 2 rating dataframes get {"message": "You are not authorized to perform this action"} (HTTP 403) In the v1 API, the storage:list_data_frames operation was not affected because it uses project_id. Change-Id: Ie4aa6a21e3829223aab0f91d809e311e0f0318cb Story: 2009879 Task: 44618
This commit is contained in:
parent
249ea00192
commit
32bf128b81
@ -72,7 +72,7 @@ class DataFrameList(base.BaseResource):
|
||||
policy.authorize(
|
||||
flask.request.context,
|
||||
'dataframes:get',
|
||||
{'tenant_id': flask.request.context.project_id},
|
||||
{'project_id': flask.request.context.project_id},
|
||||
)
|
||||
|
||||
begin = begin or tzutils.get_month_start()
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes policy check when getting dataframes using the v2 API, causing the
|
||||
operation to fail when run by a non-admin user. See story 2009879
|
||||
<https://storyboard.openstack.org/#!/story/2009879>`_ for more details.
|
Loading…
x
Reference in New Issue
Block a user