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

Feature request: Password reset #186

Closed
svengineer opened this issue Aug 30, 2015 · 9 comments
Closed

Feature request: Password reset #186

svengineer opened this issue Aug 30, 2015 · 9 comments
Milestone

Comments

@svengineer
Copy link

After adding a new user to a Gym, I get a random password. I forgot to save/change the password...
I'm not able to reset it or delete the user again.

@rolandgeider
Copy link
Member

This makes sense. The gym manager (or whatever the role is called that can add users) should be able to change user's passwords to a random string again.

@jamessimas
Copy link
Contributor

Looking into this.

@jamessimas
Copy link
Contributor

I've got the reset password functionality coded, but I am still working on it. It has two problems at the present:

  1. There is no confirmation dialogue for reseting the user's password, so if an admin clicks the link by accident, it will reset the password. I am working on adding a dialogue to confirm their intention to reset the password.
  2. It's not translatable. This is the first time I've worked with Django translations. Are there any tips/tricks to offer aside from reading their documents, @rolandgeider ? I took a brief look at the .po files in the project and it appears they may be generated by some sort of script. Is that true?

@rolandgeider
Copy link
Member

Cool!

  1. Now that you mention it, you are right, some kind of confirmation is needed. If you are using class based views, you could perhaps look at django's delete view, it only deletes the object after clicking on a confirmation button (actually, those views only delete when accessed through a POST request, which is what the button does). It might be easy to cook up some kind of mixin from that.
  2. There are no tricks, you just mark the strings as translatable (with _('foo') in python and {% trans 'foo' %} in the template). Where there are some tricks is with the generation of the .po file because some of the strings have to be extracted from the database (see here). But you don't have to worry about that, I only update the .po files before a release.

@jamessimas
Copy link
Contributor

Still working on this. I hope to wrap it up next week sometime. Just FYI.

@rolandgeider
Copy link
Member

Thanks, and don't worry, I'm your boss or anything! 😄

@jamessimas
Copy link
Contributor

Apologies, but I'm going to put this one in the "somebody take it if you want it" bucket. Work's picked up again and I've got too many things going on in my private life right now to take this on in a reasonable amount of time.

When things slow down for me and I can help out again, I'll be back!

@rolandgeider
Copy link
Member

@jamessimas yeah, that happens sometimes, don't sweat about it. Come back anytime you can/want, there'll always be open issues :)

@rolandgeider
Copy link
Member

For everybody else, James' commits are on his reset-user-password branch

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

No branches or pull requests

3 participants