]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix missing check for admin/adv_service
authorKevin Benton <blak111@gmail.com>
Tue, 15 Sep 2015 17:11:28 +0000 (10:11 -0700)
committerKevin Benton <blak111@gmail.com>
Tue, 15 Sep 2015 18:21:15 +0000 (11:21 -0700)
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

index d121a03c7ea1e49d576817203917726961d61066..73ba8d0bcc7b4d10d76d3842714079daff96d302 100644 (file)
@@ -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,