summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAviral Dasgupta <aviraldg@gmail.com>2012-04-29 07:26:25 +0530
committerAviral Dasgupta <aviraldg@gmail.com>2012-04-29 07:36:50 +0530
commit9bea85795705d015cdadc82c68b99196a8554f5c (patch)
tree1f140572d9d088e1f3dc1add5d787015d3f8a6cd
parent97c899284000df8d733f5cff7ec8e8406a455c8c (diff)
Fixed #17967: Hide "Change Password" link in admin if user.has_usable_password is False.
-rw-r--r--django/contrib/admin/templates/admin/base.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html
index 6e2de51440..3ebec911ed 100644
--- a/django/contrib/admin/templates/admin/base.html
+++ b/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>