Rename the X-Moniker-Tenant-ID header to X-Moniker-Sudo-Tenant-ID to make more clear its meaning and use
Change-Id: I434fa62c0b143a45b6c28b4234102849a984a0e5
This commit is contained in:
parent
5f11e21d49
commit
6f9aedb576
@ -4,11 +4,11 @@ General
|
||||
Administrative Access
|
||||
---------------------
|
||||
|
||||
Administrative users can "sudo" into another tenant by providing an additional HTTP header: 'X-Moniker-Tenant-ID'
|
||||
Administrative users can "sudo" into another tenant by providing an additional HTTP header: 'X-Moniker-Sudo-Tenant-ID'
|
||||
|
||||
.. http:get:: /url
|
||||
|
||||
Example HTTP Request using the X-Moniker-Tenant-ID header
|
||||
Example HTTP Request using the X-Moniker-Sudo-Tenant-ID header
|
||||
|
||||
**Example request**:
|
||||
|
||||
@ -17,4 +17,4 @@ Administrative users can "sudo" into another tenant by providing an additional H
|
||||
GET /domains/09494b72b65b42979efb187f65a0553e HTTP/1.1
|
||||
Host: example.com
|
||||
Accept: application/json
|
||||
X-Moniker-Tenant-ID: 12345
|
||||
X-Moniker-Sudo-Tenant-ID: 12345
|
||||
|
@ -53,7 +53,7 @@ class KeystoneContextMiddleware(wsgi.Middleware):
|
||||
local.store.context = context
|
||||
|
||||
# Attempt to sudo, if requested.
|
||||
sudo_tenant_id = headers.get('X-Moniker-Tenant-ID', None)
|
||||
sudo_tenant_id = headers.get('X-Moniker-Sudo-Tenant-ID', None)
|
||||
|
||||
if sudo_tenant_id:
|
||||
context.sudo(sudo_tenant_id)
|
||||
|
@ -65,7 +65,7 @@ class KeystoneContextMiddlewareTest(ApiTestCase):
|
||||
'X-User-ID': 'UserID',
|
||||
'X-Tenant-ID': 'TenantID',
|
||||
'X-Roles': 'admin,Member',
|
||||
'X-Moniker-Tenant-ID': 'SudoTenantID'
|
||||
'X-Moniker-Sudo-Tenant-ID': 'SudoTenantID'
|
||||
}
|
||||
|
||||
# Process the request
|
||||
|
Loading…
x
Reference in New Issue
Block a user