mirror of https://github.com/jumpserver/jumpserver
修改bug
parent
14da0f18ab
commit
84a48d3aec
|
@ -300,14 +300,17 @@ def user_add(request):
|
|||
server_add_user(username, password, ssh_key_pwd1)
|
||||
if LDAP_ENABLE:
|
||||
ldap_add_user(username, ldap_pwd)
|
||||
msg = '添加用户%s成功!'
|
||||
msg = u'添加用户 %s 成功!' % username
|
||||
|
||||
except Exception, e:
|
||||
error = '添加用户%s失败 %s' % e
|
||||
error = u'添加用户 %s 失败 %s ' % (username, e)
|
||||
try:
|
||||
db_del_user(username)
|
||||
server_del_user(username)
|
||||
if LDAP_ENABLE:
|
||||
ldap_del_user(username)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return render_to_response('juser/user_add.html', locals())
|
||||
|
||||
|
|
Loading…
Reference in New Issue