From 4f2ed3cf1ef19f46c18065dd2ee533e79545d142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20Ka=CC=88ser?= Date: Tue, 11 Aug 2015 13:16:02 +0200 Subject: [PATCH] fixes for workspace auth --- ipynbsrv/core/auth/checks.py | 2 +- ipynbsrv/web/settings.py | 16 ++++++++-------- ipynbsrv/web/templates/web/snippets/navbar.html | 4 ++-- lib/confs/nginx/ipynbsrv.conf | 8 +++++++- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ipynbsrv/core/auth/checks.py b/ipynbsrv/core/auth/checks.py index 8da43d9..255e5c0 100644 --- a/ipynbsrv/core/auth/checks.py +++ b/ipynbsrv/core/auth/checks.py @@ -1,7 +1,7 @@ from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.http.response import HttpResponse -from ipynbsrv.wui.models import PortMapping +from ipynbsrv.core.models import PortMapping COOKIE_NAME = 'username' diff --git a/ipynbsrv/web/settings.py b/ipynbsrv/web/settings.py index ef89ab5..158d7ca 100644 --- a/ipynbsrv/web/settings.py +++ b/ipynbsrv/web/settings.py @@ -1,22 +1,22 @@ -''' +""" Setting storing the name of the cookie that is used to check access via the reverse proxy to containers. -''' +""" AUTH_COOKIE_NAME = 'username' -''' +""" Setting storing the name of the header that is indicating the requested URI, the reverse proxy is adding to sub-requests. -''' +""" PROXY_URI_HEADER = 'HTTP_X_ORIGINAL_URI' -''' +""" Setting storing the URL under which the application\'s documentation can be found. -''' +""" URL_DOCS = '/docs/' -''' +""" Setting storing the URL under which the user publications can be found. -''' +""" URL_PUBLIC = '/public/' diff --git a/ipynbsrv/web/templates/web/snippets/navbar.html b/ipynbsrv/web/templates/web/snippets/navbar.html index ba77957..f0de9c8 100644 --- a/ipynbsrv/web/templates/web/snippets/navbar.html +++ b/ipynbsrv/web/templates/web/snippets/navbar.html @@ -25,7 +25,7 @@ -