From ea784bfeefb2b2d24378f9fa881aaf7eabd6593c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Wed, 16 Oct 2013 11:45:17 +0000 Subject: [PATCH] Sorted alphabetically Services --- server/src/uds/transports/HTML5RDP/HTML5RDP.py | 5 +++-- server/src/uds/web/views.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/src/uds/transports/HTML5RDP/HTML5RDP.py b/server/src/uds/transports/HTML5RDP/HTML5RDP.py index 475278a5..773c8f10 100644 --- a/server/src/uds/transports/HTML5RDP/HTML5RDP.py +++ b/server/src/uds/transports/HTML5RDP/HTML5RDP.py @@ -92,6 +92,9 @@ class HTML5RDPTransport(Transport): import uuid username = user.getUsernameForAuth() + + if self.fixedName.value is not '': + username = self.fixedName.value domain = '' if username.find('@') != -1: @@ -99,8 +102,6 @@ class HTML5RDPTransport(Transport): elif username.find('\\') != -1: domain, username = username.split('\\') - if self.fixedName.value is not '': - username = self.fixedName.value if self.fixedPassword.value is not '': password = self.fixedPassword.value if self.fixedDomain.value is not '': diff --git a/server/src/uds/web/views.py b/server/src/uds/web/views.py index 6e9f61c4..6ca6d7c8 100644 --- a/server/src/uds/web/views.py +++ b/server/src/uds/web/views.py @@ -191,6 +191,8 @@ def index(request): logger.debug('Services: {0}'.format(services)) + services = sorted(services, key=lambda s: s['name']) + if len(services) == 1 and GlobalConfig.AUTORUN_SERVICE.get(True) == '1' and len(services[0]['transports']) > 0: if request.session.get('autorunDone', '0') == '0': request.session['autorunDone'] = '1'