Remove require_admin_context
this function was used to put into db layer to ensure the request has admin context or a unauthorized exception will be raised, this is not needed as we already move all this kind of check into api layer and policy functions. Change-Id: Ia411e6715e4c584952a275a001f1791ca1352d97
This commit is contained in:
parent
474c2ef282
commit
8d4eac270a
|
@ -323,12 +323,6 @@ def is_user_context(context):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def require_admin_context(ctxt):
|
|
||||||
"""Raise exception.AdminRequired() if context is not an admin context."""
|
|
||||||
if not ctxt.is_admin:
|
|
||||||
raise exception.AdminRequired()
|
|
||||||
|
|
||||||
|
|
||||||
def require_context(ctxt):
|
def require_context(ctxt):
|
||||||
"""Raise exception.Forbidden() if context is not a user or an
|
"""Raise exception.Forbidden() if context is not a user or an
|
||||||
admin context.
|
admin context.
|
||||||
|
|
Loading…
Reference in New Issue