From 7204a86f87555f2545fa4337b0ea8c61807763fe Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 14 Sep 2023 14:26:17 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/backends/passkey/serializer.py | 2 +- apps/locale/zh/LC_MESSAGES/django.mo | 4 ++-- apps/locale/zh/LC_MESSAGES/django.po | 2 +- apps/settings/serializers/auth/base.py | 4 +--- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/authentication/backends/passkey/serializer.py b/apps/authentication/backends/passkey/serializer.py index 681d23dff..c73386ece 100644 --- a/apps/authentication/backends/passkey/serializer.py +++ b/apps/authentication/backends/passkey/serializer.py @@ -7,7 +7,7 @@ class PasskeySerializer(serializers.ModelSerializer): class Meta: model = Passkey fields = [ - 'id', 'name', 'is_active', 'created_by', + 'id', 'name', 'is_active', 'platform', 'created_by', 'date_last_used', 'date_created', ] read_only_fields = list(set(fields) - {'is_active'}) diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index b2cd45407..ae900ceae 100644 --- a/apps/locale/zh/LC_MESSAGES/django.mo +++ b/apps/locale/zh/LC_MESSAGES/django.mo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:75605427042ba75f9ff8e3da6f073495fdd8df18a3b340fa0c178936141d0263 -size 130198 +oid sha256:1c741e666932f64ed2196c4e196081b825e6e53bde3719dbd137d6cd9dbbbae8 +size 130201 diff --git a/apps/locale/zh/LC_MESSAGES/django.po b/apps/locale/zh/LC_MESSAGES/django.po index 05179bd91..4840f692f 100644 --- a/apps/locale/zh/LC_MESSAGES/django.po +++ b/apps/locale/zh/LC_MESSAGES/django.po @@ -4825,7 +4825,7 @@ msgstr "只有 SSL 域名可以使用 Passkey(通行密钥)认证" #: settings/serializers/auth/passkey.py:15 msgid "FIDO server ID" -msgstr "Passkey 服务 ID" +msgstr "Passkey 服务域名" #: settings/serializers/auth/passkey.py:17 msgid "" diff --git a/apps/settings/serializers/auth/base.py b/apps/settings/serializers/auth/base.py index 16cf535b4..57034e730 100644 --- a/apps/settings/serializers/auth/base.py +++ b/apps/settings/serializers/auth/base.py @@ -19,13 +19,11 @@ class AuthSettingSerializer(serializers.Serializer): AUTH_FEISHU = serializers.BooleanField(default=False, label=_('FeiShu Auth')) AUTH_WECOM = serializers.BooleanField(default=False, label=_('WeCom Auth')) AUTH_SSO = serializers.BooleanField(default=False, label=_("SSO Auth")) + AUTH_PASSKEY = serializers.BooleanField(default=False, label=_("Passkey Auth")) FORGOT_PASSWORD_URL = serializers.CharField( required=False, allow_blank=True, max_length=1024, label=_("Forgot password url") ) - # HEALTH_CHECK_TOKEN = serializers.CharField( - # required=False, max_length=1024, label=_("Health check token") - # ) LOGIN_REDIRECT_MSG_ENABLED = serializers.BooleanField( required=False, label=_("Enable login redirect msg") )