From 6e6384fb0041c44d0b905e789ab264a5607d6639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez=20Garc=C3=ADa?= Date: Tue, 25 Aug 2020 13:46:20 +0200 Subject: [PATCH] Fixed authentication multihost --- server/src/uds/web/util/configjs.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/src/uds/web/util/configjs.py b/server/src/uds/web/util/configjs.py index f2de8c74..ccd16e69 100644 --- a/server/src/uds/web/util/configjs.py +++ b/server/src/uds/web/util/configjs.py @@ -91,11 +91,12 @@ def udsJs(request: 'HttpRequest') -> str: authenticators = [Authenticator.objects.order_by('priority')[0]] except Exception: # There is no authenticators yet... authenticators = [] - else: - authenticators = Authenticator.objects.all().exclude(visible=False) + else: # No disallow global login + if tag: # with tag, get all with this tag + authenticators = [x for x in authenticators if x.small_name == tag] + else: # Get all visibles... + authenticators = Authenticator.objects.all().exclude(visible=False)[:] - if tag: - authenticators = [x for x in authenticators if x.small_name == tag] # the auths for client def getAuthInfo(auth: Authenticator):