mirror of https://github.com/jumpserver/jumpserver
perf: 修改 i18n
parent
9dd7675bc9
commit
853f9c422d
|
@ -6,7 +6,7 @@ from django.db.transaction import atomic
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
from rest_framework import serializers
|
||||
|
||||
from accounts.models import Account, AccountTemplate
|
||||
from accounts.models import Account
|
||||
from accounts.serializers import AccountSerializerCreateValidateMixin
|
||||
from common.serializers import WritableNestedModelSerializer, SecretReadableMixin, CommonModelSerializer
|
||||
from common.serializers.fields import LabeledChoiceField
|
||||
|
|
|
@ -6381,7 +6381,7 @@ msgstr "登录被阻塞"
|
|||
|
||||
#: users/serializers/user.py:93
|
||||
msgid "Can public key authentication"
|
||||
msgstr "能否公钥认证"
|
||||
msgstr "公钥认证"
|
||||
|
||||
#: users/serializers/user.py:162
|
||||
msgid "Avatar url"
|
||||
|
|
|
@ -96,11 +96,8 @@ class UserSerializer(RolesSerializerMixin, CommonBulkSerializerMixin, serializer
|
|||
read_only=True
|
||||
)
|
||||
password = EncryptedField(
|
||||
label=_("Password"),
|
||||
required=False,
|
||||
allow_blank=True,
|
||||
allow_null=True,
|
||||
max_length=1024,
|
||||
label=_("Password"), required=False, allow_blank=True,
|
||||
allow_null=True, max_length=1024,
|
||||
)
|
||||
custom_m2m_fields = {
|
||||
"system_roles": [BuiltinRole.system_user],
|
||||
|
@ -129,10 +126,8 @@ class UserSerializer(RolesSerializerMixin, CommonBulkSerializerMixin, serializer
|
|||
]
|
||||
# 包含不太常用的字段,可以没有
|
||||
fields_verbose = fields_small + [
|
||||
"mfa_force_enabled",
|
||||
"is_first_login",
|
||||
"date_password_last_updated",
|
||||
"avatar_url",
|
||||
"mfa_force_enabled", "is_first_login",
|
||||
"date_password_last_updated", "avatar_url",
|
||||
]
|
||||
# 外键的字段
|
||||
fields_fk = []
|
||||
|
|
Loading…
Reference in New Issue