1
0
mirror of https://github.com/django/django.git synced 2025-04-01 12:06:43 +00:00

Fixed #17967: Hide "Change Password" link in admin if user.has_usable_password is False.

This commit is contained in:
Aviral Dasgupta 2012-04-29 07:26:25 +05:30
parent 97c8992840
commit 9bea857957

View File

@ -32,7 +32,9 @@
{% if docsroot %}
<a href="{{ docsroot }}">{% trans 'Documentation' %}</a> /
{% endif %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}">{% trans 'Change password' %}</a> /
{% endif $}
<a href="{% url 'admin:logout' %}">{% trans 'Log out' %}</a>
{% endblock %}
</div>