Raise HTTPUnauthorized in ContextMiddleware
in this place exsception should be raised, not returned. Change-Id: I6f01608548defd5182137d7287009ec7ab1756ea
This commit is contained in:
parent
da7482eab0
commit
ff2b33b772
@ -88,7 +88,7 @@ class ContextMiddleware(BaseContextMiddleware):
|
|||||||
|
|
||||||
if ctx.project_id is None:
|
if ctx.project_id is None:
|
||||||
LOG.debug("X_PROJECT_ID not found in request")
|
LOG.debug("X_PROJECT_ID not found in request")
|
||||||
return webob.exc.HTTPUnauthorized()
|
raise webob.exc.HTTPUnauthorized()
|
||||||
|
|
||||||
ctx.is_admin = CONF.admin_role.strip().lower() in ctx.roles
|
ctx.is_admin = CONF.admin_role.strip().lower() in ctx.roles
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user