def notebook_proxy(request): # Make sure we have a logged in user auth = request.registry.queryUtility(IAuthenticationPolicy) username = auth.authenticated_userid(request) if not username: # This will trigger HTTP Basic Auth dialog, as per basic_challenge handler below raise httpexceptions.HTTPForbidden( "You need to be logged in. Hint: user / password") return _notebook_proxy(request, username)
def notebook_proxy(request): """Proxy IPython Notebook requests to the upstream server. A special ``shell`` permission is needed to access this view. See :ref:`websauna.superusers`. """ return _notebook_proxy(request, request.user.username)
def notebook_proxy(request): """Proxy IPython Notebook requests to the upstream server.""" return _notebook_proxy(request, request.user.username)