mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-02 16:05:29 +00:00
perf: 优化设置布局
This commit is contained in:
@@ -99,24 +99,31 @@ class SecurityAuthSerializer(serializers.Serializer):
|
||||
ONLY_ALLOW_EXIST_USER_AUTH = serializers.BooleanField(
|
||||
required=False, default=False, label=_("Only exist user login"),
|
||||
help_text=_(
|
||||
"If enabled, non-existent users will not be allowed to log in; if disabled, users of other authentication methods except local authentication methods are allowed to log in and automatically create users (if the user does not exist)")
|
||||
"If enabled, non-existent users will not be allowed to log in; if disabled, "
|
||||
"users of other authentication methods except local authentication methods are allowed "
|
||||
"to log in and automatically create users (if the user does not exist)"
|
||||
)
|
||||
)
|
||||
ONLY_ALLOW_AUTH_FROM_SOURCE = serializers.BooleanField(
|
||||
required=False, default=False, label=_("Only from source login"),
|
||||
help_text=_(
|
||||
"If it is enabled, the user will only authenticate to the source when logging in; if it is disabled, the user will authenticate all the enabled authentication methods in a certain order when logging in, and as long as one of the authentication methods is successful, they can log in directly")
|
||||
"If it is enabled, the user will only authenticate to the source when logging in; "
|
||||
"if it is disabled, the user will authenticate all the enabled authentication methods "
|
||||
"in a certain order when logging in, and as long as one of the authentication methods is successful, "
|
||||
"they can log in directly"
|
||||
)
|
||||
)
|
||||
SECURITY_MFA_VERIFY_TTL = serializers.IntegerField(
|
||||
min_value=5, max_value=60 * 60 * 10,
|
||||
label=_("MFA verify TTL (secend)"),
|
||||
label=_("MFA verify TTL"),
|
||||
help_text=_(
|
||||
"The verification MFA takes effect only when you view the account password"
|
||||
"Unit: second, The verification MFA takes effect only when you view the account password"
|
||||
)
|
||||
)
|
||||
VERIFY_CODE_TTL = serializers.IntegerField(
|
||||
min_value=5, max_value=60 * 60 * 10,
|
||||
label=_("Verify code TTL"),
|
||||
help_text=_("Unit: second, reset password and send SMS code expiration time")
|
||||
label=_("Verify code TTL (second)"),
|
||||
help_text=_("Reset password and send SMS code expiration time")
|
||||
)
|
||||
SECURITY_LOGIN_CHALLENGE_ENABLED = serializers.BooleanField(
|
||||
required=False, default=False,
|
||||
@@ -207,3 +214,10 @@ class SecuritySettingSerializer(SecurityPasswordRuleSerializer, SecurityAuthSeri
|
||||
'If the account is logged in from a common login city, the system sends a remote login reminder'
|
||||
)
|
||||
)
|
||||
OTP_ISSUER_NAME = serializers.CharField(
|
||||
required=False, max_length=16, label=_('OTP issuer name'),
|
||||
)
|
||||
OTP_VALID_WINDOW = serializers.IntegerField(
|
||||
min_value=1, max_value=10,
|
||||
label=_("OTP valid window")
|
||||
)
|
||||
|
Reference in New Issue
Block a user