##// END OF EJS Templates
auth-tokens: don't generate builtin token for new users....
marcink -
r1478:8313bda1 default
parent child Browse files
Show More
@@ -828,12 +828,10 b' class User(Base, BaseModel):'
828 828 Session().add(usr)
829 829 log.debug('updated user %s lastactivity', usr.username)
830 830
831 def update_password(self, new_password, change_api_key=False):
832 from rhodecode.lib.auth import get_crypt_password,generate_auth_token
831 def update_password(self, new_password):
832 from rhodecode.lib.auth import get_crypt_password
833 833
834 834 self.password = get_crypt_password(new_password)
835 if change_api_key:
836 self.api_key = generate_auth_token(self.username)
837 835 Session().add(self)
838 836
839 837 @classmethod
@@ -308,9 +308,6 b' class UserModel(BaseModel):'
308 308 new_user.name = firstname
309 309 new_user.lastname = lastname
310 310
311 if not edit:
312 new_user.api_key = generate_auth_token(username)
313
314 311 # set password only if creating an user or password is changed
315 312 if not edit or _password_change(new_user, password):
316 313 reason = 'new password' if edit else 'new user'
General Comments 0
You need to be logged in to leave comments. Login now