mirror of
https://github.com/dkmstr/openuds.git
synced 2025-08-25 13:49:59 +03:00
Small string fixes
This commit is contained in:
@ -96,16 +96,12 @@ class TOTP_MFA(mfas.MFA):
|
|||||||
tab=_('Config'),
|
tab=_('Config'),
|
||||||
)
|
)
|
||||||
|
|
||||||
doNotAskForOTP = gui.ChoiceField(
|
doNotAskForOTP = gui.CheckBoxField(
|
||||||
label=_('Requre HOTP for users within networks'),
|
label=_('Require TOTP for users within networks'),
|
||||||
order=33,
|
order=33,
|
||||||
defaultValue='0',
|
tooltip=_('If checked, users within networks will not be asked for TOTP'),
|
||||||
tooltip=_('Action for user without defined Radius Challenge'),
|
defvalue=gui.FALSE,
|
||||||
required=True,
|
required=False,
|
||||||
values={
|
|
||||||
'0': _('Allow user login (no MFA)'),
|
|
||||||
'1': _('Require user to login with MFA'),
|
|
||||||
},
|
|
||||||
tab=_('Config'),
|
tab=_('Config'),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -141,7 +137,7 @@ class TOTP_MFA(mfas.MFA):
|
|||||||
for i in models.Network.objects.filter(uuid__in=self.networks.value)
|
for i in models.Network.objects.filter(uuid__in=self.networks.value)
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.doNotAskForOTP.value == '0':
|
if self.doNotAskForOTP.isTrue():
|
||||||
return not checkIp()
|
return not checkIp()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user