mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +03:00
small fix on REST (visual)
This commit is contained in:
parent
a3dd038e79
commit
07c304cecb
@ -78,7 +78,7 @@ class Dispatcher(View):
|
||||
content_type = None
|
||||
|
||||
cls = None
|
||||
while len(path) > 0:
|
||||
while path:
|
||||
# .json, .xml, ... will break path recursion
|
||||
if path[0].find('.') != -1:
|
||||
content_type = path[0].split('.')[1]
|
||||
@ -92,7 +92,7 @@ class Dispatcher(View):
|
||||
break
|
||||
|
||||
full_path = '/'.join(full_path)
|
||||
logger.debug("REST request: {} ({})".format(full_path, content_type))
|
||||
logger.debug('REST request: %s (%s)', full_path, content_type)
|
||||
|
||||
# Here, service points to the path
|
||||
cls = service['']
|
||||
|
@ -191,12 +191,20 @@ def ticketAuth(request, ticketId):
|
||||
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():
|
||||
logger.debug("{} {}".format(v.uuid, v.name))
|
||||
# for v in DeployedService.objects.all():
|
||||
# logger.debug("{} {}".format(v.uuid, v.name))
|
||||
|
||||
# Check if servicePool is part of the ticket
|
||||
if servicePool is not None:
|
||||
# If service pool is in there, also is transport
|
||||
# Deferred update transport
|
||||
servicePoolDb = DeployedService.objects.get(uuid=servicePool)
|
||||
for t in servicePoolDb.transports.order_by('priority'):
|
||||
typeTrans = t.getType()
|
||||
if t.validForIp(request.ip) and typeTrans.supportsOs(request.os['OS']) and t.validForOs(request.os['OS']):
|
||||
transport = t.uuid
|
||||
break
|
||||
|
||||
res = userServiceManager().getService(request.user, request.ip, 'F' + servicePool, transport, False)
|
||||
_x, userService, _x, transport, _x = res
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user