[Update] 修复系统用户管理用户提及重置密码的bug (#2899)

* [Update] 修复系统用户管理用户提及重置密码的bug

* [Update]  去掉forms

* [Update] 修改翻译

* [Update] 去掉debug信息
This commit is contained in:
老广
2019-07-08 15:35:20 +08:00
committed by GitHub
parent 4c34246750
commit bf5acf7ef1
13 changed files with 411 additions and 276 deletions

View File

@@ -197,6 +197,17 @@ class AssetUser(OrgModelMixin):
self.public_key = ''
self.save()
@staticmethod
def gen_password():
return str(uuid.uuid4())
@staticmethod
def gen_key(username):
private_key, public_key = ssh_key_gen(
username=username
)
return private_key, public_key
def auto_gen_auth(self):
password = str(uuid.uuid4())
private_key, public_key = ssh_key_gen(