Opened 8 years ago

Closed 8 years ago

#17967 closed New feature (fixed)

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

Reported by: Dougal Sutherland Owned by: Aviral Dasgupta
Component: contrib.admin Version: 1.4
Severity: Normal Keywords:
Cc: Aviral Dasgupta 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 Aviral Dasgupta 8 years ago.
patch against [17802]

Download all attachments as: .zip

Change History (4)

comment:1 Changed 8 years ago by Aviral Dasgupta

Owner: changed from nobody to Aviral Dasgupta
Status: newassigned
Triage Stage: UnreviewedAccepted
Type: BugNew feature

Changed 8 years ago by Aviral Dasgupta

Attachment: change-password.diff added

patch against [17802]

comment:2 Changed 8 years ago by Aviral Dasgupta

Cc: Aviral Dasgupta added
Easy pickings: set
Has patch: set
Needs documentation: set
Needs tests: set

comment:3 Changed 8 years ago by Adrian Holovaty

Resolution: fixed
Status: assignedclosed


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