From 2bd97d205b98292be709b0257bda5fc489eb643a Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Mon, 2 Jun 2014 03:14:02 -0700 Subject: [PATCH] Pass object to policy when finding fields to strip During the evaluation of fields to strip in responses to list operations, pass also the first object in the list to the policy engine. This will avoid errors in policy evaluation if during an upgrade from icehouse policy.json was not updated to remove attribute-level policies dependent on resource values. Closes-Bug: #1323715 Change-Id: Iaa6ed3bbf4a07ce0b614a4197cabdfa1cb36d427 --- neutron/api/v2/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/api/v2/base.py b/neutron/api/v2/base.py index 5692df01b..2ed735e27 100644 --- a/neutron/api/v2/base.py +++ b/neutron/api/v2/base.py @@ -141,7 +141,7 @@ class Controller(object): if policy.check( context, '%s:%s' % (self._plugin_handlers[self.SHOW], attr_name), - None, + data, might_not_exist=True): # this attribute is visible, check next one continue -- 2.45.2