Merge "[placement] Use modern attributes of oslo_context"
This commit is contained in:
@@ -71,7 +71,7 @@ class PlacementKeystoneContext(Middleware):
|
||||
ctx = RequestContext.from_environ(
|
||||
req.environ, request_id=req_id)
|
||||
|
||||
if ctx.user is None:
|
||||
if ctx.user_id is None:
|
||||
LOG.debug("Neither X_USER_ID nor X_USER found in request")
|
||||
return webob.exc.HTTPUnauthorized()
|
||||
|
||||
|
||||
@@ -60,8 +60,8 @@ def placement_authorize(context, action, target=None):
|
||||
"""
|
||||
placement_init()
|
||||
if target is None:
|
||||
target = {'project_id': context.tenant,
|
||||
'user_id': context.user}
|
||||
target = {'project_id': context.project_id,
|
||||
'user_id': context.user_id}
|
||||
credentials = context.to_policy_values()
|
||||
# TODO(alaski): Change this to use authorize() when rules are registered.
|
||||
# noqa the following line because a hacking check disallows using enforce.
|
||||
|
||||
Reference in New Issue
Block a user