Skip to content
This repository has been archived by the owner on Apr 25, 2022. It is now read-only.

recently_used validator needs access to request.user #3

Open
aclark4life opened this issue Dec 5, 2012 · 3 comments
Open

recently_used validator needs access to request.user #3

aclark4life opened this issue Dec 5, 2012 · 3 comments

Comments

@aclark4life
Copy link
Owner

No description provided.

@kencochrane
Copy link
Contributor

The recently_used validator should only be used when someone is changing their password, not when they are registering. When someone is changing their password they should be logged in, so the request.user object is available. If they are registering, there is no request.user, or it is of the anonymous user. So if the request.user isn't available or is anonymous, then you can skip that validation, and say it passed.

Does this make sense?

@aclark4life
Copy link
Owner Author

No, I mean that if I use a proper django-passwords validator (for a logged in user) it's no longer possible or easy to access self.user, as is done in the non-proper-django-passwords-validator approach. Either way is probably fine, just would have been nice to cram everything in to a proper django-passwords validator. See: 79d2af3

@kencochrane
Copy link
Contributor

Oh, I see. I understand now..

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

No branches or pull requests

2 participants