magnum/magnum
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
..
api Pass a mutable target to oslo policy enforcer 2017-06-15 10:03:24 +01:00
cmd Merge "Support magnum-api multiple process workers" 2017-02-15 08:37:27 +00:00
common Remove reliance on osprofiler configuration section 2017-06-07 09:29:06 +00:00
conductor Fix CVE-2016-7404 2017-02-22 19:22:10 +01:00
conf Enable custom keystone endpoint_type in templates 2017-05-22 12:45:13 +02:00
db Fix CVE-2016-7404 2017-02-22 19:22:10 +01:00
drivers Fix rexray systemd unit 2017-05-25 06:13:39 +00:00
hacking Add i18n translation for Log messages 2016-08-15 11:44:08 +05:30
objects Resource Quota - Limit clusters per project 2017-01-25 08:55:45 -06:00
service Integrate OSProfiler in Magnum 2017-01-24 07:43:31 +07:00
servicegroup Cleanup MagnumService Object usage 2016-01-29 15:39:28 +08:00
tests Remove reliance on osprofiler configuration section 2017-06-07 09:29:06 +00:00
__init__.py Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
i18n.py Setup for translation 2015-05-24 03:13:55 +00:00
version.py Remove coding:utf-8 2015-08-03 23:28:22 +08:00