Skip to content

Commit

Permalink
Stop showing the change password link if users have unusable passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Jul 8, 2024
1 parent 428e090 commit ac4c901
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/templates/projects/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ <h2>{% translate 'Account' %}</h2>
<form class="buttons">
{% csrf_token %}
<button class="button" type="submit" formmethod="post" formaction="{% url 'logout' %}">{% translate 'Log out' %}</button>
<a class="button" href="{% url 'password_change' %}">{% translate 'Change password' %}</a>
{% if request.user.has_usable_password %}
<a class="button" href="{% url 'password_change' %}">{% translate 'Change password' %}</a>
{% endif %}
</form>

{% endblock %}

0 comments on commit ac4c901

Please sign in to comment.