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:
jichenjc 2016-11-28 04:06:26 +08:00
parent 474c2ef282
commit 8d4eac270a
1 changed files with 0 additions and 6 deletions

View File

@ -323,12 +323,6 @@ def is_user_context(context):
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):
"""Raise exception.Forbidden() if context is not a user or an
admin context.