From 87c7452d19c2c1515448634d0eb56b8a957ffce0 Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 21 Oct 2019 17:02:16 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9email=20msg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/locale/zh/LC_MESSAGES/django.mo | Bin 80914 -> 80782 bytes apps/locale/zh/LC_MESSAGES/django.po | 177 ++++++++++----------------- apps/settings/api.py | 14 ++- apps/users/utils.py | 27 ++-- 4 files changed, 93 insertions(+), 125 deletions(-) diff --git a/apps/locale/zh/LC_MESSAGES/django.mo b/apps/locale/zh/LC_MESSAGES/django.mo index 62707d10805f7b734067ee4bc83b8bed3d839c0e..3c2a395cb88e66e85f4d74cc057378acebb9e6dd 100644 GIT binary patch delta 18303 zcmb{3XLwgtw#V_45E23b3?YP0=%Iy#j#TMHq^VTt9qC;_4jlr5K%^HbDpf%PihxuR zkS0Z`q9alj1RUBRaKFF*UiW#%nfvn2y!h<3&pCUqz4ksQ0cPer3YqyZWL8zbMX={J zYUg>=JkMLz!Slvqd`Hi_fE)2>kmpVBiuQfa9?QrlJP;35#J+PtVJX zC9pUqVLT2sKR|N!PGMoJ*vlo{4lfb+=;eD}1dV#VU8b*M6mbU(#le^xM`Bi-k72k0 zGvQ{`3iqMLIc{D=jdKGv&QsKLA#b`k0#%_XpGIaH`7s6)Q3Ex^G}r=Tu??!!qfiM= zLX~tSYAe3Pba(`F;rFO5xr-SvtdF}Mg$0OnqbljwprHXfp&lHA+KNS}jNiu>a5bs| zTQMyj#q@Z}yo8a&H&6?Df}Jr#U$@eJScG^qYU@^Ef9Cg&(ilufwSF8V{1jis5U$Er zsQwLD5uc+Hs5rotvKp#VbubPaU{M^1x^E$BrSD^F+=F#6*Fc>W_P-+yW&SRzge%N- zsM4ik1nxo|)+4CB{T(x+H^>ezYQiYg{W(x)qzG!O%A>|>WY=3^M&|dr*@eMah}cJ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MUDfb&gU#!7}-DalJZs)Zzmi`u~e+=zz4n^%~GHOR}nG4P3c6}r2i}Mxg1F_5c z_hDB3F7=&toI;iQJgQ{(aTt1Kf&zd09FAIW0_yrSa}MghMRt9?^>4QRU8slg2h@>1 zG{ef0xW1*iX#}2Tbr4rY4XlrP3tHRt0jP=IK#g0BdYIOrevRF2{pZbF<{zl1K5IF5 zUpccn2EL^Yt)rFM5tUG1)I&Gg`rom5sa^ld`j4O8OLvQ6-*%Epav~k!#lfrx}vuCX7H`&x5L1Sq#Gz49tr<`{tEH#GZ~do9aMr%P`}coq81o#{S)zN;(4eFpF!Q{ zU!P&I5#nVQe}h`!I4Y47s0q%Y{xSFls?@QD9}>Jj zcYI7>1!sWcO8;mu4msaUHhh2uh6wmT#f%WN`q4d_V3s?7yg>@udy{>DUcD_zGBAn?Tb|XPq%2~zxV&|nKH(A8eUuj|M|ZZx7>fY zF{9=yjdT9{3@J(d*Uow6=YC=3tHhVDTs^tk+NlRi1p6uf|F!);>q=R3{A<&Jn%2si zk?C-e!hcoOw)nqB^*{1Npq|Z-=SxmW>iAd5|5+1i^gnOG0Eq{~GW= u3;EAv`X4D;j{jYn`^AMVv#z|q{>p+y|7o?rL=>3xYqiU@_S}&b-Tw\n" "Language-Team: Jumpserver team\n" @@ -95,7 +95,7 @@ msgstr "运行参数" #: terminal/templates/terminal/command_list.html:66 #: terminal/templates/terminal/session_list.html:28 #: terminal/templates/terminal/session_list.html:72 -#: xpack/plugins/change_auth_plan/forms.py:64 +#: xpack/plugins/change_auth_plan/forms.py:73 #: xpack/plugins/change_auth_plan/models.py:412 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:46 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:54 @@ -112,7 +112,7 @@ msgstr "资产" #: applications/templates/applications/remote_app_detail.html:53 #: applications/templates/applications/remote_app_list.html:20 #: applications/templates/applications/user_remote_app_list.html:16 -#: assets/forms/asset.py:21 assets/forms/domain.py:73 assets/forms/user.py:75 +#: assets/forms/asset.py:21 assets/forms/domain.py:77 assets/forms/user.py:75 #: assets/forms/user.py:95 assets/models/base.py:28 assets/models/cluster.py:18 #: assets/models/cmd_filter.py:21 assets/models/domain.py:20 #: assets/models/group.py:20 assets/models/label.py:18 @@ -151,7 +151,7 @@ msgstr "资产" #: users/templates/users/user_list.html:35 #: users/templates/users/user_profile.html:51 #: users/templates/users/user_pubkey_update.html:57 -#: xpack/plugins/change_auth_plan/forms.py:47 +#: xpack/plugins/change_auth_plan/forms.py:56 #: xpack/plugins/change_auth_plan/models.py:63 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:61 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:12 @@ -322,6 +322,7 @@ msgstr "远程应用" #: xpack/plugins/cloud/templates/cloud/sync_instance_task_create_update.html:53 #: xpack/plugins/gathered_user/templates/gathered_user/task_create_update.html:44 #: xpack/plugins/interface/templates/interface/interface.html:72 +#: xpack/plugins/orgs/templates/orgs/org_create_update.html:33 #: xpack/plugins/vault/templates/vault/vault_create.html:45 msgid "Reset" msgstr "重置" @@ -639,7 +640,7 @@ msgstr "网域" #: perms/templates/perms/asset_permission_list.html:53 #: perms/templates/perms/asset_permission_list.html:74 #: perms/templates/perms/asset_permission_list.html:124 -#: xpack/plugins/change_auth_plan/forms.py:65 +#: xpack/plugins/change_auth_plan/forms.py:74 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_execution_list.html:55 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:15 #: xpack/plugins/cloud/models.py:157 @@ -668,7 +669,7 @@ msgstr "如果有多个的互相隔离的网络,设置资产属于的网域, #: assets/forms/asset.py:132 assets/forms/asset.py:136 #: assets/forms/domain.py:17 assets/forms/label.py:15 #: perms/templates/perms/asset_permission_asset.html:78 -#: xpack/plugins/change_auth_plan/forms.py:55 +#: xpack/plugins/change_auth_plan/forms.py:64 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:74 msgid "Select assets" msgstr "选择资产" @@ -677,15 +678,15 @@ msgstr "选择资产" msgid "Content should not be contain: {}" msgstr "内容不能包含: {}" -#: assets/forms/domain.py:51 +#: assets/forms/domain.py:55 msgid "Password should not contain special characters" msgstr "不能包含特殊字符" -#: assets/forms/domain.py:70 +#: assets/forms/domain.py:74 msgid "SSH gateway support proxy SSH,RDP,VNC" msgstr "SSH网关,支持代理SSH,RDP和VNC" -#: assets/forms/domain.py:74 assets/forms/user.py:76 assets/forms/user.py:96 +#: assets/forms/domain.py:78 assets/forms/user.py:76 assets/forms/user.py:96 #: assets/models/base.py:29 assets/models/gathered_user.py:16 #: assets/templates/assets/_asset_user_auth_update_modal.html:15 #: assets/templates/assets/_asset_user_auth_view_modal.html:21 @@ -706,7 +707,7 @@ msgstr "SSH网关,支持代理SSH,RDP和VNC" #: users/templates/users/user_detail.html:67 #: users/templates/users/user_list.html:36 #: users/templates/users/user_profile.html:47 -#: xpack/plugins/change_auth_plan/forms.py:49 +#: xpack/plugins/change_auth_plan/forms.py:58 #: xpack/plugins/change_auth_plan/models.py:65 #: xpack/plugins/change_auth_plan/models.py:408 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:65 @@ -1451,7 +1452,7 @@ msgid "Update asset user auth" msgstr "更新资产用户认证信息" #: assets/templates/assets/_asset_user_auth_update_modal.html:23 -#: xpack/plugins/change_auth_plan/forms.py:51 +#: xpack/plugins/change_auth_plan/forms.py:60 msgid "Please input password" msgstr "请输入密码" @@ -1637,7 +1638,7 @@ msgstr "替换资产的管理员" #: assets/templates/assets/admin_user_detail.html:91 #: perms/templates/perms/asset_permission_asset.html:103 -#: xpack/plugins/change_auth_plan/forms.py:59 +#: xpack/plugins/change_auth_plan/forms.py:68 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_asset_list.html:99 #: xpack/plugins/gathered_user/forms.py:36 msgid "Select nodes" @@ -1877,7 +1878,6 @@ msgstr "删除选择资产" #: users/templates/users/user_group_list.html:118 #: users/templates/users/user_list.html:254 #: xpack/plugins/interface/templates/interface/interface.html:101 -#: xpack/plugins/orgs/templates/orgs/org_create_update.html:33 msgid "Cancel" msgstr "取消" @@ -3394,33 +3394,33 @@ msgstr "远程应用授权用户列表" msgid "RemoteApp permission RemoteApp list" msgstr "远程应用授权远程应用列表" -#: settings/api.py:27 +#: settings/api.py:28 msgid "Test mail sent to {}, please check" msgstr "邮件已经发送{}, 请检查" -#: settings/api.py:55 +#: settings/api.py:67 msgid "Test ldap success" msgstr "连接LDAP成功" -#: settings/api.py:92 +#: settings/api.py:104 msgid "Match {} s users" msgstr "匹配 {} 个用户" -#: settings/api.py:151 +#: settings/api.py:163 msgid "succeed: {} failed: {} total: {}" msgstr "成功:{} 失败:{} 总数:{}" -#: settings/api.py:173 settings/api.py:209 +#: settings/api.py:185 settings/api.py:221 msgid "" "Error: Account invalid (Please make sure the information such as Access key " "or Secret key is correct)" msgstr "错误:账户无效 (请确保 Access key 或 Secret key 等信息正确)" -#: settings/api.py:179 settings/api.py:215 +#: settings/api.py:191 settings/api.py:227 msgid "Create succeed" msgstr "创建成功" -#: settings/api.py:197 settings/api.py:235 +#: settings/api.py:209 settings/api.py:247 #: settings/templates/settings/terminal_setting.html:154 msgid "Delete succeed" msgstr "删除成功" @@ -4536,7 +4536,7 @@ msgid "" "You should use your ssh client tools connect terminal: {}

{}" msgstr "你可以使用ssh客户端工具连接终端" -#: users/api/user.py:176 +#: users/api/user.py:173 msgid "Could not reset self otp, use profile reset instead" msgstr "不能再该页面重置MFA, 请去个人信息页面重置" @@ -4874,7 +4874,7 @@ msgid "Always young, always with tears in my eyes. Stay foolish Stay hungry" msgstr "永远年轻,永远热泪盈眶 stay foolish stay hungry" #: users/templates/users/reset_password.html:46 -#: users/templates/users/user_detail.html:379 users/utils.py:84 +#: users/templates/users/user_detail.html:379 users/utils.py:83 msgid "Reset password" msgstr "重置密码" @@ -5190,61 +5190,57 @@ msgid "" "corresponding private key." msgstr "新的公钥已设置成功,请下载对应的私钥" +# msgid "Update user" +# msgstr "更新用户" #: users/utils.py:24 #, python-format msgid "" "\n" -" \n" -"

\n" -" \n" -" Username: %(username)s.\n" -" \n" -" \n" -" click here to set your password\n" -" \n" -" \n" -" This link is valid for 1 hour. After it expires, request new one\n" -" \n" -" \n" +"

\n" +"

Your account has been created successfully

\n" +"
\n" +" Username: %(username)s\n" +"
\n" +" Password: \n" +" click here to set your password \n" +" (This link is valid for 1 hour. After it expires, request new one)\n" +"
\n" +"
\n" +"

---

\n" " Login direct\n" -" \n" -"

\n" +"
\n" +"
\n" " " msgstr "" "\n" -" \n" -"

\n" -" \n" -" 用户名: %(username)s.\n" -" \n" -" \n" -" " -"请点击这里设置密码\n" -" \n" -" \n" -" 这个链接有效期1小时, 超过时间您可以 重新申请\n" -" \n" -" \n" -" ---登录页面\n" -" \n" -"

\n" -" " +"
\n" +"

您的账户已创建成功

\n" +"
\n" +" 用户名: %(username)s\n" +"
\n" +" 密码: 请点击这里设置密码 (这个链接有效期1小时, 超过时" +"间您可以 重新申请)\n" +"
\n" +"
\n" +"

---

\n" +" 直接登录\n" +"
\n" +"
\n" +" " -#: users/utils.py:59 +#: users/utils.py:58 msgid "Create account successfully" msgstr "创建账户成功" -#: users/utils.py:63 +#: users/utils.py:62 #, python-format msgid "Hello %(name)s" msgstr "您好 %(name)s" -#: users/utils.py:86 +#: users/utils.py:85 #, python-format msgid "" "\n" @@ -5288,11 +5284,11 @@ msgstr "" "
\n" " " -#: users/utils.py:117 +#: users/utils.py:116 msgid "Security notice" msgstr "安全通知" -#: users/utils.py:119 +#: users/utils.py:118 #, python-format msgid "" "\n" @@ -5341,11 +5337,11 @@ msgstr "" "
\n" " " -#: users/utils.py:155 +#: users/utils.py:154 msgid "Expiration notice" msgstr "过期通知" -#: users/utils.py:157 +#: users/utils.py:156 #, python-format msgid "" "\n" @@ -5367,11 +5363,11 @@ msgstr "" "
\n" " " -#: users/utils.py:176 +#: users/utils.py:175 msgid "SSH Key Reset" msgstr "重置ssh密钥" -#: users/utils.py:178 +#: users/utils.py:177 #, python-format msgid "" "\n" @@ -5485,7 +5481,7 @@ msgstr "MFA 解绑成功,返回登录页面" msgid "Password length" msgstr "密码长度" -#: xpack/plugins/change_auth_plan/forms.py:66 +#: xpack/plugins/change_auth_plan/forms.py:75 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_create_update.html:60 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_detail.html:81 #: xpack/plugins/change_auth_plan/templates/change_auth_plan/plan_list.html:17 @@ -5499,7 +5495,7 @@ msgstr "密码长度" msgid "Periodic perform" msgstr "定时执行" -#: xpack/plugins/change_auth_plan/forms.py:70 +#: xpack/plugins/change_auth_plan/forms.py:79 msgid "" "Tips: The username of the user on the asset to be modified. if the user " "exists, change the password; If the user does not exist, create the user." @@ -5507,12 +5503,12 @@ msgstr "" "提示:用户名为将要修改的资产上的用户的用户名。如果用户存在,则修改密码;如果" "用户不存在,则创建用户。" -#: xpack/plugins/change_auth_plan/forms.py:74 xpack/plugins/cloud/forms.py:90 +#: xpack/plugins/change_auth_plan/forms.py:83 xpack/plugins/cloud/forms.py:90 #: xpack/plugins/gathered_user/forms.py:44 msgid "Tips: (Units: hour)" msgstr "提示:(单位: 时)" -#: xpack/plugins/change_auth_plan/forms.py:75 xpack/plugins/cloud/forms.py:91 +#: xpack/plugins/change_auth_plan/forms.py:84 xpack/plugins/cloud/forms.py:91 #: xpack/plugins/gathered_user/forms.py:45 msgid "" "eg: Every Sunday 03:05 run <5 3 * * 0>
Tips: Using 5 digits linux " @@ -6307,45 +6303,6 @@ msgstr "创建" #~ msgid "Update user groups" #~ msgstr "更新用户组" -# msgid "Update user" -# msgstr "更新用户" -#~ msgid "" -#~ "\n" -#~ " \n" -#~ "

\n" -#~ " \n" -#~ " click here to set your password\n" -#~ " \n" -#~ " \n" -#~ " This link is valid for 1 hour. After it expires, request new one\n" -#~ " \n" -#~ " \n" -#~ " Login direct\n" -#~ " \n" -#~ "

\n" -#~ " " -#~ msgstr "" -#~ "\n" -#~ " \n" -#~ "

\n" -#~ " \n" -#~ " 请点击这里设置密码\n" -#~ " \n" -#~ " \n" -#~ " 这个链接有效期1小时, 超过时间您可以, 重新申请\n" -#~ " \n" -#~ " \n" -#~ " Login direct\n" -#~ " \n" -#~ "

\n" -#~ " " - #~ msgid "Template" #~ msgstr "模板" diff --git a/apps/settings/api.py b/apps/settings/api.py index d327bde17..22a295b68 100644 --- a/apps/settings/api.py +++ b/apps/settings/api.py @@ -5,6 +5,7 @@ import os import json import jms_storage +from smtplib import SMTPSenderRefused from rest_framework import generics from rest_framework.views import Response, APIView from django.conf import settings @@ -41,9 +42,20 @@ class MailTestingAPI(APIView): email_from = email_from or email_host_user email_recipient = email_recipient or email_from send_mail(subject, message, email_from, [email_recipient]) + except SMTPSenderRefused as e: + resp = e.smtp_error + if isinstance(resp, bytes): + for coding in ('gbk', 'utf8'): + try: + resp = resp.decode(coding) + except UnicodeDecodeError: + continue + else: + break + return Response({"error": str(resp)}, status=401) except Exception as e: + print(e) return Response({"error": str(e)}, status=401) - return Response({"msg": self.success_message.format(email_recipient)}) else: return Response({"error": str(serializer.errors)}, status=401) diff --git a/apps/users/utils.py b/apps/users/utils.py index 59400694e..30868358c 100644 --- a/apps/users/utils.py +++ b/apps/users/utils.py @@ -22,21 +22,20 @@ logger = logging.getLogger('jumpserver') def construct_user_created_email_body(user): default_body = _(""" - -

- - Username: %(username)s. - - - click here to set your password - - - This link is valid for 1 hour. After it expires, request new one - - +

+

Your account has been created successfully

+
+ Username: %(username)s +
+ Password: + click here to set your password + (This link is valid for 1 hour. After it expires, request new one) +
+
+

---

Login direct - -

+
+
""") % { 'username': user.username, 'rest_password_url': reverse('users:reset-password', external=True),