def authenticated_403(self):
    """Decorator for method to raise 403 error instead of redirect to login

    Like tornado.web.authenticated, this decorator raises a 403 error
    instead of redirecting to login.
    """
    if self.current_user is None:
        raise web.HTTPError(403)
Decorator for method to raise 403 error instead of redirect to login

Like tornado.web.authenticated, this decorator raises a 403 error
instead of redirecting to login.
jupyterhub/utils.py