magnum/magnum/api
Mark Goddard 3afe70ad80 Pass a mutable target to oslo policy enforcer
Magnum API previously passed magnum.objects.cluster.Cluster objects as
the target argument to magnum.common.policy.enforce(). However, enforce()
expects target to be a mutable mapping, as it adds an entry for
trustee_domain_id which is used by the magnum policy.json. This causes
cluster detailed GET requests to fail with the following message:

AttributeError: 'Cluster' object has no attribute 'trustee_domain_id'

This change uses the as_dict() method of the magnum RPC objects to
provide a mutable mapping to the policy enforcer.

Change-Id: I54b136243afff9e0fadae3be4b36cad1679e5721
Closes-Bug: #1689797
(cherry picked from commit f1326626b9)
2017-06-15 10:03:24 +01:00
..
controllers Pass a mutable target to oslo policy enforcer 2017-06-15 10:03:24 +01:00
middleware Updates microversion root and error messages 2016-07-08 02:39:05 -07:00
__init__.py Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
app.py Centralize config option: api section 2016-09-22 00:59:34 +00:00
attr_validator.py Fix some typos 2017-02-16 00:20:01 -08:00
config.py Fix api access with public acl routes 2016-02-29 13:59:20 +08:00
expose.py Drop XML support in Magnum 2015-07-13 20:03:23 -05:00
hooks.py Fix a typo 2016-11-18 11:05:55 +08:00
http_error.py Add microversioning support for methods 2016-08-03 13:28:48 -07:00
rest_api_version_history.rst Add microversion and release notes for quotas API 2017-02-09 10:47:07 -06:00
servicegroup.py Remove the usage of MagnumObjectDictCompat from magnum_service 2017-01-06 03:25:28 +00:00
utils.py Centralize config option: api section 2016-09-22 00:59:34 +00:00
validation.py Don't create clusters of an unsupported type 2017-02-01 14:02:31 -06:00
versioned_method.py Fix some typos 2017-02-16 00:20:01 -08:00