Skip to content

Commit

Permalink
Fix scoped auth for non-admins (bug 1081192)
Browse files Browse the repository at this point in the history
Change-Id: I6c92e026c5f46ac29947d6e0e94f571ccd48f032
  • Loading branch information
dolph committed Nov 20, 2012
1 parent 27f0c72 commit e4ed1f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions keystoneclient/v2_0/client.py
Expand Up @@ -182,11 +182,12 @@ def authenticate(self, username=None, password=None, tenant_name=None,
# to determine what to do. Otherwise, load up the service catalog
self.auth_token = self.auth_ref.auth_token
if self.auth_ref.scoped:
if self.management_url is None:
if self.management_url is None \
and self.auth_ref.management_url:
self.management_url = self.auth_ref.management_url[0]
self.tenant_name = self.auth_ref.tenant_name
self.tenant_id = self.auth_ref.tenant_id
self.user_id = self.auth_ref.user_id
self.user_id = self.auth_ref.user_id
self._extract_service_catalog(self.auth_url, self.auth_ref)
return True
except (exceptions.AuthorizationFailure, exceptions.Unauthorized):
Expand Down

0 comments on commit e4ed1f3

Please sign in to comment.