Use unscoped token to fetch authorized projects. Fixes bug 927939.

Change-Id: I71c53b5dab068ea5ac4f87c86d464cc79c331b26
This commit is contained in:
Gabriel Hurley 2012-02-06 14:42:56 -08:00
parent 3e204672a2
commit 6892653c05

View File

@ -51,8 +51,10 @@ class HorizonMiddleware(object):
if request.user.is_authenticated() and \
request.user.authorized_tenants is None:
try:
token = request.session.get("unscoped_token",
request.user.token)
authd = api.tenant_list_for_token(request,
request.user.token,
token,
endpoint_type='internalURL')
except Exception, e:
authd = []