Skip to content

Commit

Permalink
Closes-Bug: #18280
Browse files Browse the repository at this point in the history
If HTTP_X_ROLE not found, then copy from HTTP_X_API_ROLE

Change-Id: Ic00603df974ffcc85e7c78e1a23fe37e6da2bf56
  • Loading branch information
biswajit-mandal committed Mar 30, 2016
1 parent e3fad01 commit d2835c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config/api-server/vnc_auth_keystone.py
Expand Up @@ -128,6 +128,11 @@ def __call__(self, env, start_response):
env['HTTP_X_ROLE'] = env['HTTP_X_API_ROLE']
"""

# If HTTP_X_ROLE not found, then copy from HTTP_X_API_ROLE
if 'HTTP_X_API_ROLE' in env:
if not 'HTTP_X_ROLE' in env or len(env['HTTP_X_ROLE']) == 0:
env['HTTP_X_ROLE'] = env['HTTP_X_API_ROLE']

# only allow admin access when MT is on
roles = []
if 'HTTP_X_ROLE' in env:
Expand Down

0 comments on commit d2835c7

Please sign in to comment.