From 611ca6bf42a20bfc076b3275fec4bd1f1c100691 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Tue, 15 Sep 2015 10:11:28 -0700 Subject: [PATCH] Fix missing check for admin/adv_service Adds a missing skip for a network ownership check for admins and advanced services. This was found via an API test. Change-Id: I796f6abf56dc7ff0f374b9912b92085f4a993a27 --- neutron/pecan_wsgi/hooks/ownership_validation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neutron/pecan_wsgi/hooks/ownership_validation.py b/neutron/pecan_wsgi/hooks/ownership_validation.py index d121a03c7..73ba8d0bc 100644 --- a/neutron/pecan_wsgi/hooks/ownership_validation.py +++ b/neutron/pecan_wsgi/hooks/ownership_validation.py @@ -34,7 +34,8 @@ class OwnershipValidationHook(hooks.PecanHook): # TODO(salvatore-orlando): consider whether this check can be folded # in the policy engine rtype = request.resource_type - if rtype not in ('port', 'subnet'): + if (request.context.is_admin or request.context.is_advsvc or + rtype not in ('port', 'subnet')): return plugin = manager.NeutronManager.get_plugin() network = plugin.get_network(request.context, -- 2.45.2