forked from shaba/openuds
Added limitation for users authenticated using tickets. (Tickets are
used from external apps to provide acces to one machine, but not to provide access to all platform...)
This commit is contained in:
parent
c08cb38dbc
commit
76fc938604
@ -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():
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user