mirror of https://github.com/jumpserver/jumpserver
perf: 修改认证设置类的国际化,字符串方式会直接翻译成国际化内容
parent
4a36e54030
commit
e1a1e838bf
|
@ -7,7 +7,7 @@ __all__ = [
|
|||
|
||||
|
||||
class AuthSettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('Basic'))
|
||||
PREFIX_TITLE = _('Authentication')
|
||||
|
||||
AUTH_CAS = serializers.BooleanField(required=False, label=_('CAS Auth'))
|
||||
AUTH_OPENID = serializers.BooleanField(required=False, label=_('OPENID Auth'))
|
||||
|
|
|
@ -7,7 +7,7 @@ __all__ = [
|
|||
|
||||
|
||||
class CASSettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('CAS'))
|
||||
PREFIX_TITLE = _('CAS')
|
||||
|
||||
AUTH_CAS = serializers.BooleanField(required=False, label=_('Enable CAS Auth'))
|
||||
CAS_SERVER_URL = serializers.CharField(required=False, max_length=1024, label=_('Server url'))
|
||||
|
|
|
@ -7,7 +7,7 @@ __all__ = ['DingTalkSettingSerializer']
|
|||
|
||||
|
||||
class DingTalkSettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('DingTalk'))
|
||||
PREFIX_TITLE = _('DingTalk')
|
||||
|
||||
DINGTALK_AGENTID = serializers.CharField(max_length=256, required=True, label='AgentId')
|
||||
DINGTALK_APPKEY = serializers.CharField(max_length=256, required=True, label='AppKey')
|
||||
|
|
|
@ -7,7 +7,7 @@ __all__ = ['FeiShuSettingSerializer']
|
|||
|
||||
|
||||
class FeiShuSettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('FeiShu'))
|
||||
PREFIX_TITLE = _('FeiShu')
|
||||
|
||||
FEISHU_APP_ID = serializers.CharField(max_length=256, required=True, label='App ID')
|
||||
FEISHU_APP_SECRET = EncryptedField(max_length=256, required=False, label='App Secret')
|
||||
|
|
|
@ -36,7 +36,7 @@ class LDAPUserSerializer(serializers.Serializer):
|
|||
|
||||
class LDAPSettingSerializer(serializers.Serializer):
|
||||
# encrypt_fields 现在使用 write_only 来判断了
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('LDAP'))
|
||||
PREFIX_TITLE = _('LDAP')
|
||||
|
||||
AUTH_LDAP_SERVER_URI = serializers.CharField(
|
||||
required=True, max_length=1024, label=_('LDAP server'),
|
||||
|
|
|
@ -15,7 +15,7 @@ class SettingImageField(serializers.ImageField):
|
|||
|
||||
|
||||
class OAuth2SettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('OAuth2'))
|
||||
PREFIX_TITLE = _('OAuth2')
|
||||
|
||||
AUTH_OAUTH2 = serializers.BooleanField(
|
||||
default=False, label=_('Enable OAuth2 Auth')
|
||||
|
|
|
@ -9,7 +9,7 @@ __all__ = [
|
|||
|
||||
|
||||
class CommonSettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('OIDC'))
|
||||
PREFIX_TITLE = _('OIDC')
|
||||
# OpenID 公有配置参数 (version <= 1.5.8 或 version >= 1.5.8)
|
||||
BASE_SITE_URL = serializers.CharField(
|
||||
required=False, allow_null=True, allow_blank=True,
|
||||
|
|
|
@ -10,7 +10,7 @@ __all__ = ['RadiusSettingSerializer']
|
|||
|
||||
|
||||
class RadiusSettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('Radius'))
|
||||
PREFIX_TITLE = _('Radius')
|
||||
|
||||
AUTH_RADIUS = serializers.BooleanField(required=False, label=_('Enable Radius Auth'))
|
||||
RADIUS_SERVER = serializers.CharField(required=False, allow_blank=True, max_length=1024, label=_('Host'))
|
||||
|
|
|
@ -8,7 +8,7 @@ __all__ = [
|
|||
|
||||
|
||||
class SAML2SettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('SAML2'))
|
||||
PREFIX_TITLE = _('SAML2')
|
||||
|
||||
AUTH_SAML2 = serializers.BooleanField(
|
||||
default=False, required=False, label=_('Enable SAML2 Auth')
|
||||
|
|
|
@ -7,7 +7,7 @@ __all__ = [
|
|||
|
||||
|
||||
class SSOSettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('SSO'))
|
||||
PREFIX_TITLE = _('SSO')
|
||||
|
||||
AUTH_SSO = serializers.BooleanField(
|
||||
required=False, label=_('Enable SSO auth'),
|
||||
|
|
|
@ -7,7 +7,7 @@ __all__ = ['WeComSettingSerializer']
|
|||
|
||||
|
||||
class WeComSettingSerializer(serializers.Serializer):
|
||||
PREFIX_TITLE = '%s-%s' % (_('Authentication'), _('WeCom'))
|
||||
PREFIX_TITLE = _('WeCom')
|
||||
|
||||
WECOM_CORPID = serializers.CharField(max_length=256, required=True, label='corpid')
|
||||
WECOM_AGENTID = serializers.CharField(max_length=256, required=True, label='agentid')
|
||||
|
|
Loading…
Reference in New Issue