Is it possible to implement an equivalent of sudo
for Django profiles ? I'm using the basic authentication system django.contrib.auth
.
Usecase: Sometimes, users report bugs which are only reproductible in their profile, so, each time, I change their password, log in, fix the bug and replaces the password with the original one.
I tried to implement this feature by using login()
but it requires a call to authenticate()
in the first place which is not an option because we don't have the password in clear text, just the hashed one.
Is there any clever way to do that? Except messing up with the user's password?
Thanks!