Fixed Auth limiting by hostname/label && fixed actor changeip method (is ipchange)

This commit is contained in:
Adolfo Gómez García 2020-07-01 12:00:24 +02:00
parent 5e177059fe
commit f9ada8349f
2 changed files with 5 additions and 5 deletions

View File

@ -318,11 +318,11 @@ class BaseReadyChange(ActorV3Action):
return ActorV3Action.actorResult({'private_key': privateKey, 'server_certificate': cert, 'password': password})
class ChangeIp(BaseReadyChange):
class IpChange(BaseReadyChange):
"""
Processses IP Change.
"""
name = 'changeip'
name = 'ipchange'
class Ready(BaseReadyChange):
"""

View File

@ -81,10 +81,10 @@ def udsJs(request: 'HttpRequest') -> str:
tag = request.session.get('tag', None)
if GlobalConfig.DISALLOW_GLOBAL_LOGIN.getBool(False) is True:
if GlobalConfig.DISALLOW_GLOBAL_LOGIN.getBool() is True:
try:
authenticators = [Authenticator.objects.get(small_name=auth_host)]
except Exception:
authenticators = Authenticator.objects.filter(small_name=auth_host)[:]
except Exception as e:
try:
authenticators = [Authenticator.objects.order_by('priority')[0]]
except Exception: # There is no authenticators yet...