diff options
author | Dan Prince <dan.prince@rackspace.com> | 2011-08-29 22:27:28 -0400 |
---|---|---|
committer | Dan Prince <dan.prince@rackspace.com> | 2011-08-29 22:27:28 -0400 |
commit | ebd47b7cb397f33c1e7c9f32dd5b77f7fd5d6642 (patch) | |
tree | 80e13bd6f7e6026c32cc7784f4a62f4209105122 /nova/context.py | |
parent | 2a2aa10316abe9135541198bddd4c189976eb2fd (diff) | |
download | nova-ebd47b7cb397f33c1e7c9f32dd5b77f7fd5d6642.tar.gz nova-ebd47b7cb397f33c1e7c9f32dd5b77f7fd5d6642.tar.xz nova-ebd47b7cb397f33c1e7c9f32dd5b77f7fd5d6642.zip |
Update RequestContext so that it correctly sets self.is_admin from the
roles array. Additionally add a bit of code to ignore case as well.
Resolves issues when accessing admin API's w/ Keystone.
Diffstat (limited to 'nova/context.py')
-rw-r--r-- | nova/context.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/context.py b/nova/context.py index b917a1d81..5c22641a0 100644 --- a/nova/context.py +++ b/nova/context.py @@ -38,7 +38,7 @@ class RequestContext(object): self.roles = roles or [] self.is_admin = is_admin if self.is_admin is None: - self.admin = 'admin' in self.roles + self.is_admin = 'admin' in [x.lower() for x in self.roles] self.read_deleted = read_deleted self.remote_address = remote_address if not timestamp: |