diff --git a/apps/i18n/lina/en.json b/apps/i18n/lina/en.json index 79da14113..9de251c9c 100644 --- a/apps/i18n/lina/en.json +++ b/apps/i18n/lina/en.json @@ -1731,8 +1731,8 @@ "CertOwnerSelf": "Current User", "CertOwnerOther": "Other User", "CertOwnerUnknown": "Unknown", - "UserCertificate": "User certificate", - "LoginCertificate": "Login certificate", + "UserUKey": "User UKey", + "LoginUKeySetting": "Login UKey", "IssueCertificateDone": "Issue Certificate Done", "RefreshCertificateInfoDone": "Refresh Certificate Info Done", "CertIssueCertDone": "Certificate issued successfully", diff --git a/apps/i18n/lina/zh.json b/apps/i18n/lina/zh.json index 92a410965..be862665a 100644 --- a/apps/i18n/lina/zh.json +++ b/apps/i18n/lina/zh.json @@ -1742,8 +1742,8 @@ "CertOwnerSelf": "当前用户", "CertOwnerOther": "非当前用户", "CertOwnerUnknown": "未知", - "UserCertificate": "用户证书", - "LoginCertificate": "登录证书", + "UserUKey": "用户 UKey", + "LoginUKeySetting": "登录 UKey", "IssueCertificateDone": "制证完成", "RefreshCertificateInfoDone": "刷新证书信息完成", "CertIssueCertDone": "证书签发完成", diff --git a/apps/i18n/lina/zh_hant.json b/apps/i18n/lina/zh_hant.json index 879603c5c..5fdb0498b 100644 --- a/apps/i18n/lina/zh_hant.json +++ b/apps/i18n/lina/zh_hant.json @@ -1740,8 +1740,8 @@ "CertOwnerSelf": "當前使用者", "CertOwnerOther": "非當前使用者", "CertOwnerUnknown": "未知", - "UserCertificate": "用戶憑證", - "LoginCertificate": "登入憑證", + "UserUKey": "用戶 UKey", + "LoginUKeySetting": "登入 UKey", "IssueCertificateDone": "制證完成", "RefreshCertificateInfoDone": "刷新憑證資訊完成", "CertIssueCertDone": "憑證簽發完成", diff --git a/apps/settings/serializers/auth/cert.py b/apps/settings/serializers/auth/cert.py index 757810d75..daf8acbfc 100644 --- a/apps/settings/serializers/auth/cert.py +++ b/apps/settings/serializers/auth/cert.py @@ -34,10 +34,10 @@ def _detect_cert_algorithm(pem_content): class CertSettingSerializer(serializers.Serializer): - PREFIX_TITLE = _('Certificate') + PREFIX_TITLE = _('UKey') AUTH_CERT = serializers.BooleanField( - default=False, label=_('Certificate') + default=False, label=_('UKey') ) AUTH_CERT_CHALLENGE_TTL = serializers.IntegerField( default=300, label=_('Challenge TTL (seconds)'), diff --git a/apps/users/migrations/0001_initial.py b/apps/users/migrations/0001_initial.py index a2b1a024c..3a9f2c8c4 100644 --- a/apps/users/migrations/0001_initial.py +++ b/apps/users/migrations/0001_initial.py @@ -84,7 +84,7 @@ class Migration(migrations.Migration): choices=[('local', 'Local'), ('ldap', 'LDAP/AD'), ('ldap_ha', 'LDAP/AD (HA)'), ('openid', 'OpenID'), ('radius', 'Radius'), ('cas', 'CAS'), ('saml2', 'SAML2'), ('oauth2', 'OAuth2'), ('wecom', 'WeCom'), ('dingtalk', 'DingTalk'), ('feishu', 'FeiShu'), ('lark', 'Lark'), - ('slack', 'Slack'), ('custom', 'Custom'), ('cert', 'Certificate')], default='local', max_length=30, + ('slack', 'Slack'), ('custom', 'Custom'), ('ukey', 'UKey')], default='local', max_length=30, verbose_name='Source')), ('wecom_id', models.CharField(default=None, max_length=128, null=True, verbose_name='WeCom')), ('dingtalk_id', models.CharField(default=None, max_length=128, null=True, verbose_name='DingTalk')), diff --git a/apps/users/models/user/_source.py b/apps/users/models/user/_source.py index 1df770c8f..280495747 100644 --- a/apps/users/models/user/_source.py +++ b/apps/users/models/user/_source.py @@ -24,7 +24,7 @@ class Source(models.TextChoices): lark = "lark", _("Lark") slack = "slack", _("Slack") custom = "custom", "Custom" - cert = "cert", _("Certificate") + ukey = "ukey", _("UKey") @classmethod def as_dict(cls): @@ -57,7 +57,7 @@ class SourceMixin: Source.slack: [settings.AUTH_BACKEND_SLACK], Source.dingtalk: [settings.AUTH_BACKEND_DINGTALK], Source.custom: [settings.AUTH_BACKEND_CUSTOM], - Source.cert: [settings.AUTH_BACKEND_CERT], + Source.ukey: [settings.AUTH_BACKEND_CERT], } @classmethod