summaryrefslogtreecommitdiff
path: root/keystoneclient/v2_0
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2012-11-20 10:16:56 -0600
committerDolph Mathews <dolph.mathews@gmail.com>2012-11-20 10:16:56 -0600
commite4ed1f39a03d9979e8b41cfc6ef0daea159034a4 (patch)
treeaa232e4fc862efb93209c5a3f260bab271bf8ec2 /keystoneclient/v2_0
parent27f0c721174b149c64cc67ff718d007d94fe79aa (diff)
downloadpython-keystoneclient-e4ed1f39a03d9979e8b41cfc6ef0daea159034a4.tar.gz
Fix scoped auth for non-admins (bug 1081192)
Change-Id: I6c92e026c5f46ac29947d6e0e94f571ccd48f032
Diffstat (limited to 'keystoneclient/v2_0')
-rw-r--r--keystoneclient/v2_0/client.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/keystoneclient/v2_0/client.py b/keystoneclient/v2_0/client.py
index 39725ac..34fcdfc 100644
--- a/keystoneclient/v2_0/client.py
+++ b/keystoneclient/v2_0/client.py
@@ -182,11 +182,12 @@ class Client(client.HTTPClient):
# 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):