Browse files

Fixed #17967: Hide "Change Password" link in admin if user.has_usable…

…_password is False.
  • Loading branch information...
1 parent 97c8992 commit 9bea85795705d015cdadc82c68b99196a8554f5c @aviraldg aviraldg committed Apr 29, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 django/contrib/admin/templates/admin/base.html
View
2 django/contrib/admin/templates/admin/base.html
@@ -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>

0 comments on commit 9bea857

Please sign in to comment.