def require_context(ctxt):
    'Raise exception.Forbidden() if context is not a user or an\n    admin context.\n    '
    if ((not ctxt.is_admin) and (not is_user_context(ctxt))):
        raise exception.Forbidden()
Raise exception.Forbidden() if context is not a user or an
admin context.
def require_context(ctxt):
    'Raise exception.Forbidden() if context is not a user or an\n    admin context.\n    '
    if ((not ctxt.is_admin) and (not is_user_context(ctxt))):
        raise exception.Forbidden()