Set a default ip for connection source on service connection request

(equals to request "deducted" ip...).
This commit is contained in:
Adolfo Gómez García 2015-02-18 14:45:08 +01:00
parent 19cb475e2d
commit 2bc0f64e34
2 changed files with 3 additions and 3 deletions

View File

@ -201,8 +201,7 @@ def ticketAuth(request, ticketId):
request.session['java'] = True
request.session['OS'] = OsDetector.getOsFromUA(request.META.get('HTTP_USER_AGENT'))
request.user = usr # Temporaly store this user as "authenticated" user, next requests will be done using session
request.user = usr # Temporarily store this user as "authenticated" user, next requests will be done using session
# Check if servicePool is part of the ticket
if servicePool is not None:

View File

@ -51,7 +51,7 @@ import logging
logger = logging.getLogger(__name__)
__updated__ = '2015-02-10'
__updated__ = '2015-02-18'
@webLoginRequired
@ -84,6 +84,7 @@ def service(request, idService, idTransport):
if ip is not None:
itrans = trans.getInstance()
if itrans.isAvailableFor(ip):
ads.setConnectionSource(request.ip, 'unknown')
log.doLog(ads, log.INFO, "User service ready, rendering transport", log.WEB)
transportHtml = itrans.renderForHtml(ads, trans, ip, OsDetector.getOsFromRequest(request), request.user, webPassword(request))
UserServiceManager.manager().notifyPreconnect(ads, itrans.processedUser(ads, request.user), itrans.protocol)