Skip to content

Commit

Permalink
Fixes the check for admin role to be case-insenstive
Browse files Browse the repository at this point in the history
Lowercases every item from the role list that is compared with admin
Closes-bug: #1354549

Change-Id: Idb5497552772ed9e82ebebbfc0b3ea3a85af752b
  • Loading branch information
RaginBajin committed Aug 9, 2014
1 parent b1ceff6 commit 4767eee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rally/osclients.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def verified_keystone(self):
try:
# Ensure that user is admin
client = self.keystone()
if 'admin' not in client.auth_ref.role_names:
if 'admin' not in [role.lower() for role in
client.auth_ref.role_names]:
raise exceptions.InvalidAdminException(
username=self.endpoint.username)
except keystone_exceptions.Unauthorized:
Expand Down

0 comments on commit 4767eee

Please sign in to comment.