diff --git a/server/src/uds/web/views/auth.py b/server/src/uds/web/views/auth.py index fb5099c6..1105edeb 100644 --- a/server/src/uds/web/views/auth.py +++ b/server/src/uds/web/views/auth.py @@ -58,7 +58,7 @@ import logging logger = logging.getLogger(__name__) -__updated__ = '2015-11-06' +__updated__ = '2016-11-22' @csrf_exempt @@ -186,6 +186,7 @@ def ticketAuth(request, ticketId): webLogin(request, None, usr, password) request.user = usr # Temporarily store this user as "authenticated" user, next requests will be done using session + request.session['ticket'] = '1' # Store that user access is done using ticket logger.debug("Service & transport: {}, {}".format(servicePool, transport)) for v in DeployedService.objects.all(): diff --git a/server/src/uds/web/views/index.py b/server/src/uds/web/views/index.py index 98f4296c..38aed401 100644 --- a/server/src/uds/web/views/index.py +++ b/server/src/uds/web/views/index.py @@ -38,7 +38,7 @@ from django.utils import formats from django.template import RequestContext -from uds.core.auths.auth import webLoginRequired +from uds.core.auths.auth import webLoginRequired, webLogout from uds.models import DeployedService, Transport, UserService, Network, ServicesPoolGroup from uds.core.util.Config import GlobalConfig @@ -52,7 +52,7 @@ import logging logger = logging.getLogger(__name__) -__updated__ = '2016-05-20' +__updated__ = '2016-11-22' def about(request): @@ -76,6 +76,9 @@ def index(request): Renders the main page. :param request: http request ''' + if request.session.get('ticket') == '1': + return webLogout() + # Session data os = request.os