def require_context(ctxt):
    if not ctxt.is_admin and not is_user_context(ctxt):
        raise exception.NotAuthorized()
Raise exception.NotAuthorized() if context is not a user or an
dataset/ETHPy150Open openstack/rack/rack/context.py/require_context