Opened 4 years ago

Closed 4 years ago

#17967 closed New feature (fixed)

"change password" link in the admin header should be easier to disable

Reported by: d00gs Owned by: aviraldg
Component: contrib.admin Version: 1.4
Severity: Normal Keywords:
Cc: aviraldg Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: yes UI/UX: no


The "change password" link in the admin header doesn't make sense for all installations. For example, sites that use django-auth-ldap as the primary authentication scheme don't necessarily allow users to change their password, because it might not make sense to do so. In that case, having the "change password" link in the header of the admin is confusing for users, because it doesn't work / do what they expect it to.

I've overriden the base.html template and made this change:

<                 <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
>                 {% if user.has_usable_password %}
>                     <a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
>                 {% endif %}

which is appropriate for my sites, though I'm not sure if it is in general.

But this is annoying, because then when you update Django (as I did today) any changes to base.html just won't happen and there will probably be problems.

If has_usable_password isn't a good way to distinguish in general, then there should either be a setting for whether this should be displayed, or the <div id="user-tools"> should be in its own template for easy overriding.

Attachments (1)

change-password.diff (706 bytes) - added by aviraldg 4 years ago.
patch against [17802]

Download all attachments as: .zip

Change History (4)

comment:1 Changed 4 years ago by aviraldg

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to aviraldg
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Bug to New feature

Changed 4 years ago by aviraldg

patch against [17802]

comment:2 Changed 4 years ago by aviraldg

  • Cc aviraldg added
  • Easy pickings set
  • Has patch set
  • Needs documentation set
  • Needs tests set

comment:3 Changed 4 years ago by adrian

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


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