magnum/magnum/api
Mark Goddard f1326626b9 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
2017-05-10 17:47:38 +01:00
..
controllers Pass a mutable target to oslo policy enforcer 2017-05-10 17:47:38 +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 Remove log translations 2017-03-30 17:05:10 +08:00
app.wsgi Add WSGI script to deploy Magnum behind Apache 2017-03-02 11:27:58 +01: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 Remove log translations 2017-03-30 17:05:10 +08:00
validation.py Validate project-id on quota create 2017-02-22 10:54:00 -06:00
versioned_method.py Fix some typos 2017-02-16 00:20:01 -08:00