{% if user.is_authenticated %}
{% ifequal article.user user %}
{% if user.is_active %}
{% else %}
You are not an active user
{% endif %}
{% else %}
Only user wroted the article can edit it
{% endifequal %}
{% else %}
You should log in to edit articles
{% endif %}