summaryrefslogtreecommitdiffstats
path: root/keystone/common/wsgi.py
diff options
context:
space:
mode:
authorBrant Knudson <bknudson@us.ibm.com>2013-06-13 17:45:20 -0500
committerBrant Knudson <bknudson@us.ibm.com>2013-07-03 16:19:00 -0500
commit19fb6fc37760c3983ac9bfdd0bdeda48654533ab (patch)
treef5d591568cf7205a03559cd53d9335e69bc2a3dc /keystone/common/wsgi.py
parent62d948a66b27ad2622a324bd9a070346f7b607d2 (diff)
downloadkeystone-19fb6fc37760c3983ac9bfdd0bdeda48654533ab.tar.gz
keystone-19fb6fc37760c3983ac9bfdd0bdeda48654533ab.tar.xz
keystone-19fb6fc37760c3983ac9bfdd0bdeda48654533ab.zip
Work without admin_token_auth middleware
Requests would fail with a 500 Internal Server Error if the admin_token_auth middleware was removed from the paste pipeline. The requests would fail because the code assumed that the context contained an 'is_admin' element, but that element was only in the context if the admin_token_auth middleware was in the pipeline. This change makes it so that if the admin_token_auth middleware isn't in the paste pipeline requests will not fail with a 500 Internal Server Error. Change-Id: Ic064785226ee70ee475d8f72fea3c2ae6971a07f Fixes: bug 1190708
Diffstat (limited to 'keystone/common/wsgi.py')
-rw-r--r--keystone/common/wsgi.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py
index 5143db6e..91c28034 100644
--- a/keystone/common/wsgi.py
+++ b/keystone/common/wsgi.py
@@ -173,6 +173,8 @@ class Application(BaseApplication):
del context['REMOTE_USER']
params.update(arg_dict)
+ context.setdefault('is_admin', False)
+
# TODO(termie): do some basic normalization on methods
method = getattr(self, action)