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
1 changed files with 2 additions and 0 deletions

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>