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:
@@ -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(',')]
|
||||
|
Reference in New Issue
Block a user