get_admin_context overwriting context

When the admin context is retrieved, the user context and its request
ID is lost. All subsequent log entries would have different request IDs
and any further context checking will be using an admin's context
instead of the user's context. I'm not aware of any further checking
today, but better to fix this now and avoid that being an issue in the
future.

Change-Id: I1371ddb70736a49f9124f85352d6d195aec97c80
Closes-Bug: #1511406
This commit is contained in:
Matthew Edmonds 2016-03-14 14:55:07 -04:00
parent 43f08a562b
commit eb5a6bcc06
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ class Context(context.RequestContext):
def get_admin_context():
return Context(is_admin=True)
return Context(is_admin=True, overwrite=False)
_CTX_STORE = threading.local()