From caefbdc9175cf21b4f5f803edfba7e2b4dc88fb1 Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 24 Feb 2016 11:34:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(juser)=20=E6=8E=A8=E9=80=81=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=94=A8=E6=88=B7=EF=BC=8C=E9=80=89=E6=8B=A9=E5=AF=86?= =?UTF-8?q?=E9=92=A5=E6=97=B6=E4=B8=8D=E4=B8=BA=E7=94=A8=E6=88=B7=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当推送系统用户时,选择系统用户使用密钥时没有必要为系统用户生成密码, 以免造成安全上的问题,在代码上也属于冗余. --- jperm/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jperm/views.py b/jperm/views.py index a8a66128b..eba0921c7 100644 --- a/jperm/views.py +++ b/jperm/views.py @@ -512,10 +512,10 @@ def perm_role_push(request): task = MyTask(push_resource) ret = {} - # 因为要先建立用户,所以password 是必选项,而push key是在 password也完成的情况下的 可选项 + # 因为要先建立用户,而push key是在 password也完成的情况下的 可选项 # 1. 以秘钥 方式推送角色 if key_push: - ret["pass_push"] = task.add_user(role.name, CRYPTOR.decrypt(role.password)) + ret["pass_push"] = task.add_user(role.name) ret["key_push"] = task.push_key(role.name, os.path.join(role.key_path, 'id_rsa.pub')) # 2. 推送账号密码