changeset 6204:09dc083f461f

api: drop odd creation of password when extern_name is set The check of extern_name and the interpretation of it seems odd. Also, there is no point in setting a random password. It can't be retrieved and used, and not setting a password is more secure.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 12 Sep 2016 17:41:19 +0200
parents 995254e30c7b
children 12bc5b6057a7
files kallithea/controllers/api/api.py
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/api/api.py	Mon Sep 12 17:41:19 2016 +0200
+++ b/kallithea/controllers/api/api.py	Mon Sep 12 17:41:19 2016 +0200
@@ -677,10 +677,6 @@
         if User.get_by_email(email):
             raise JSONRPCError("email `%s` already exist" % (email,))
 
-        if Optional.extract(extern_name):
-            # generate temporary password if user is external
-            password = PasswordGenerator().gen_password(length=8)
-
         try:
             user = UserModel().create_or_update(
                 username=Optional.extract(username),