diff --git a/CHANGES.rst b/CHANGES.rst index 74e81a0..74fe061 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,11 @@ Change Log ========== +0.9.6 +----- +* Correct method signature to match Meteor Accounts.resetPassword in + dddp.accounts submodule. + 0.9.5 ----- * Include array of `permissions` on User publication. diff --git a/README.rst b/README.rst index 6ad8405..afd6ece 100644 --- a/README.rst +++ b/README.rst @@ -170,6 +170,9 @@ Contributors `Tyson Clugg `_ * Author, conceptual design. +`Yan Le `_ + * Validate and bug fix dddp.accounts submodule. + `MEERQAT `_ * Project sponsor - many thanks for allowing this to be released under an open source license! diff --git a/dddp/accounts/ddp.py b/dddp/accounts/ddp.py index 9506333..ab7720a 100644 --- a/dddp/accounts/ddp.py +++ b/dddp/accounts/ddp.py @@ -442,10 +442,10 @@ class Auth(APIMixin): ) @api_endpoint('resetPassword') - def reset_password(self, params): + def reset_password(self, token, new_password): """Reset password using a token received in email then logs user in.""" - user, _ = self.validated_user_and_session(params['token']) - user.set_password(params['newPassword']) + user, _ = self.validated_user_and_session(token) + user.set_password(new_password) user.save() auth.login(this.request, user) self.update_subs(user.pk) diff --git a/setup.py b/setup.py index 92035a4..febb465 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup, find_packages setup( name='django-ddp', - version='0.9.5', + version='0.9.6', description=__doc__, long_description=open('README.rst').read(), author='Tyson Clugg',