Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old password check before password update #317

Conversation

jakubrohleder
Copy link
Contributor

I've added extra config param check_current_password_before_update with possible values of :attributes or :password and default value of false.

If config.check_current_password_before_update is set to :attributes the current_password param is checked before any update, if it is set to :password the current_password param is checked only if the request updates user password.

@booleanbetrayal
Copy link
Collaborator

LGTM!

booleanbetrayal added a commit that referenced this pull request Jul 21, 2015
…ore-update

Old password check before password update
@booleanbetrayal booleanbetrayal merged commit 32c1329 into lynndylanhurley:master Jul 21, 2015
@sebfie
Copy link

sebfie commented Aug 7, 2015

There is an issue with this pull request. We can use current_password to check before to update, but not after a request of password reset.

So, here is my workflow :

  • I ask password reset
  • I fill password and password_confirmation
  • It asks me the current_password

So maybe we should be able to bypass this requirement using an extra params? Or the reset token?

@jakubrohleder Can you fix this pull request? Thx!!!

@jakubrohleder
Copy link
Contributor Author

@sebfie Sorry for the late response, but I was on holiday. I'll look at this issue tonight / tomorrow and hopefully fix all the bugs.

@sebfie
Copy link

sebfie commented Aug 18, 2015

Perfect! Thx a lot

@jakubrohleder
Copy link
Contributor Author

@sebfie I made a quick fix under my fork. It is not tested yet, but you can try if it works for you, I'll make a PR after preparing some decent tests.

@jakubrohleder
Copy link
Contributor Author

@sebfie I just made a PR fixing this bug, sorry for a long time waiting.

@sebfie
Copy link

sebfie commented Sep 10, 2015

Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants