perf: 优化设置中的数字大小

This commit is contained in:
ibuler
2021-09-15 16:22:51 +08:00
committed by Jiangjie.Bai
parent 8c3f89ee51
commit 741b96ddee
6 changed files with 19 additions and 5 deletions

View File

@@ -69,7 +69,10 @@ class SecurityAuthSerializer(serializers.Serializer):
required=False, default=False, label=_("Only from source login"),
help_text=_("If enable, CAS、OIDC auth will be failed, if user not exist yet")
)
SECURITY_MFA_VERIFY_TTL = serializers.IntegerField(label=_("MFA verify TTL"), help_text=_("Unit: second"))
SECURITY_MFA_VERIFY_TTL = serializers.IntegerField(
min_value=5, max_value=60*30,
label=_("MFA verify TTL"), help_text=_("Unit: second"),
)
SECURITY_LOGIN_CAPTCHA_ENABLED = serializers.BooleanField(
required=False, default=True,
label=_("Enable Login captcha")