]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Allow for skipping admin roles loading on context creation
authorSalvatore Orlando <salv.orlando@gmail.com>
Wed, 28 Aug 2013 07:32:31 +0000 (00:32 -0700)
committerEugene Nikanorov <enikanorov@mirantis.com>
Wed, 28 Aug 2013 10:06:43 +0000 (14:06 +0400)
commita8b619dd611fb68167332fa7373bbd3fe578ecde
treef67c8538d9ccdb81baa50ff9f12402bbe886fc97
parent893799910474a31800aeeac580d956b25a70a5e5
Allow for skipping admin roles loading on context creation

Bug 1216866

There are cases in which an admin context is created only to grab a db
session and ensure no tenant filters are applied in _model_query. In
these cases evaluating the policy engine for grabbing admin roles is not
necessary, and can cause unexpected and serious issues if the context is
grabbed before all the extensions are loaded.

Change-Id: I0cbf4b51ca1286373c16eb907840a32f4b8190c6
neutron/context.py
neutron/tests/unit/test_neutron_context.py