From: Steven Hardy Date: Wed, 6 Feb 2013 11:39:12 +0000 (+0000) Subject: heat common : context should split roles from X-Roles X-Git-Tag: 2014.1~927^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a45bbcc8e2c2c98cbd673c845a226721931d9729;p=openstack-build%2Fheat-build.git heat common : context should split roles from X-Roles The auth_token code joins roles with a comma delimiter and stores the result in the X-Roles header, so we need to split X-Roles back into a list for the context (otherwise the oslo policy code breaks) Change-Id: I32bd1d6355b6fe0e16e729f35b1d0b5c61346a70 Signed-off-by: Steven Hardy --- diff --git a/heat/common/context.py b/heat/common/context.py index 0bdca8e1..68d0c09c 100644 --- a/heat/common/context.py +++ b/heat/common/context.py @@ -185,7 +185,7 @@ class ContextMiddleware(wsgi.Middleware): tenant = headers.get('X-Tenant-Name') tenant_id = headers.get('X-Tenant-Id') auth_url = headers.get('X-Auth-Url') - roles = headers.get('X-Roles') + roles = headers.get('X-Roles').split(',') except Exception: raise exception.NotAuthenticated()