Remove support for deprecated header X_ROLE

X_ROLE support was deprecated in 2012
(bc0ba55ae6) we are overdue in removing
support for it.

Change-Id: I81d1bb4eb4ac7278c02e3e937f74aeadbd20c0f5
This commit is contained in:
Joe Gordon
2014-11-12 14:51:00 -08:00
parent ee718d2265
commit 5338cf5426
2 changed files with 1 additions and 22 deletions

View File

@@ -160,12 +160,5 @@ class NovaKeystoneContext(wsgi.Middleware):
def _get_roles(self, req):
"""Get the list of roles."""
if 'X_ROLES' in req.headers:
roles = req.headers.get('X_ROLES', '')
else:
# Fallback to deprecated role header:
roles = req.headers.get('X_ROLE', '')
if roles:
LOG.warning(_LW("Sourcing roles from deprecated X-Role HTTP "
"header"))
roles = req.headers.get('X_ROLES', '')
return [r.strip() for r in roles.split(',')]