Fixed policy for removal of old ips on multiple_ip and restored "/disabled" behavior

This commit is contained in:
Adolfo Gómez García 2021-03-03 12:31:35 +01:00
parent 0e20ccc19c
commit 8a8df3de35

View File

@ -184,9 +184,7 @@ class Authenticator(ManagedObjectModel, TaggingMixin):
from uds.core.util.config import GlobalConfig
if tag:
authsList: 'QuerySet' = Authenticator.objects.all()
if tag != 'disabled':
authsList = authsList.filter(small_name=tag).order_by('priority', 'name')
authsList: 'QuerySet' = Authenticator.objects.filter(small_name=tag).order_by('priority', 'name')
if not authsList:
authsList = Authenticator.objects.all().order_by('priority', 'name')
# If disallow global login (use all auths), get just the first by priority/name