Skip to content

Commit

Permalink
Fixed #17967: Hide "Change Password" link in admin if user.has_usable…
Browse files Browse the repository at this point in the history
…_password is False.
  • Loading branch information
aviraldg committed Apr 29, 2012
1 parent 97c8992 commit 9bea857
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django/contrib/admin/templates/admin/base.html
Expand Up @@ -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>
Expand Down

0 comments on commit 9bea857

Please sign in to comment.