summaryrefslogtreecommitdiff
path: root/neutron/context.py
diff options
context:
space:
mode:
authorAnn Kamyshnikova <akamyshnikova@mirantis.com>2014-11-20 19:13:52 +0300
committerYaguang Tang <yaguang.tang@canonical.com>2014-11-25 11:20:34 +0800
commitd09ba29a5f16ad26fb01abfc9791c1ef7a845bc7 (patch)
tree2b7c29e7b626d9d8591c24086ee6b16e7f06954a /neutron/context.py
parent581977d958a456294044043e0c422303ba5a1def (diff)
downloadneutron-d09ba29a5f16ad26fb01abfc9791c1ef7a845bc7.tar.gz
Fix context.elevated
The current version of elevated method sets for the original context the admin role too. This change fix this. Added unittest. Closes-bug: #1386932 Change-Id: Ife881112efa151e53bfa4b7af35643dcf2d1114f (cherry picked from commit 98fae47ad1b9b72e41d444ce6f96cf5f2a3b6f0c)
Diffstat (limited to 'neutron/context.py')
-rw-r--r--neutron/context.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/neutron/context.py b/neutron/context.py
index f248e70250..1da9b77423 100644
--- a/neutron/context.py
+++ b/neutron/context.py
@@ -144,7 +144,7 @@ class ContextBase(common_context.RequestContext):
context.is_admin = True
if 'admin' not in [x.lower() for x in context.roles]:
- context.roles.append('admin')
+ context.roles = context.roles + ["admin"]
if read_deleted is not None:
context.read_deleted = read_deleted