Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#13845 closed (fixed)

Contrib auth password-reset email depends on is_admin_site

Reported by: petr.pulc@… Owned by: nobody
Component: contrib.auth Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Just a weird behavior in there:

Assume I got a portal that have to work under few different URLs or just I want to have it portable. So, I do not want to really use Sites and I turn is_admin_site to True. But now, password-reset email turns to default one, no matter what my email_template_name setting is.

I thing it is just a bug in django.contrib.auth.views.password_reset, where is_admin_site (l98) should only control domain override.

Change History (4)

comment:1 Changed 5 years ago by gabrielhurley

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

For the record, the reason behind that email template control has to do with the way the template name and the site domain name were being passed around between the view and the save method of PasswordResetForm. It wasn't pretty.

This issue is definitely valid, so I'll accept it. However, this issue has a fix in the patch for #14386, which broadly decouples the sites framework from the various contrib apps. Provided that patch gets committed, this issue will be fixed.

comment:2 Changed 5 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from new to closed

(In [13980]) Fixed #14386, #8960, #10235, #10909, #10608, #13845, #14377 - standardize Site/RequestSite usage in various places.

Many thanks to gabrielhurley for putting most of this together. Also to
bmihelac, arthurk, qingfeng, hvendelbo, petr.pulc@…, Hraban for
reports and some initial patches.

The patch also contains some whitespace/PEP8 fixes.

comment:3 Changed 5 years ago by lukeplant

(In [13987]) [1.2.X] Fixed #14386, #8960, #10235, #10909, #10608, #13845, #14377 - standardize Site/RequestSite usage in various places.

Many thanks to gabrielhurley for putting most of this together. Also to
bmihelac, arthurk, qingfeng, hvendelbo, petr.pulc@…, Hraban for
reports and some initial patches.

The patch also contains some whitespace/PEP8 fixes.

Backport of [13980] from trunk. Some items could be considered features
(i.e. supporting RequestSite in various contrib apps), others are definite
bugs, but it was much more robust to backport all these tightly related
changes together.

comment:11 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top