forked from shaba/openuds
Fixed configjs so disabled custom auths works in all cases
This commit is contained in:
parent
d38347c534
commit
24687fda2e
@ -98,7 +98,7 @@ def udsJs(request: 'HttpRequest') -> str:
|
|||||||
if tag and authenticators: # Refilter authenticators, visible and with this tag if required
|
if tag and authenticators: # Refilter authenticators, visible and with this tag if required
|
||||||
authenticators = [x for x in authenticators if x.small_name == tag or (tag == 'disabled' and x.getType().isCustom() is False)]
|
authenticators = [x for x in authenticators if x.small_name == tag or (tag == 'disabled' and x.getType().isCustom() is False)]
|
||||||
|
|
||||||
if not authenticators:
|
if not authenticators and tag != 'disabled':
|
||||||
try:
|
try:
|
||||||
authenticators = [Authenticator.objects.order_by('priority')[0]]
|
authenticators = [Authenticator.objects.order_by('priority')[0]]
|
||||||
except Exception: # There is no authenticators yet...
|
except Exception: # There is no authenticators yet...
|
||||||
|
Loading…
Reference in New Issue
Block a user