The UserEditView view add the "user" context variable and confuses the base.html template. Update the base template to use *request.user* instead of just *user* to access the currently logged user. GitLab issue #295.
This commit is contained in:
@@ -68,10 +68,10 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if not user.is_authenticated %}
|
||||
{% if not request.user.is_authenticated %}
|
||||
{% trans 'Anonymous' %}
|
||||
{% else %}
|
||||
<li><a href="{% url 'common:current_user_details' %}" title="{% trans 'User details' %}">{{ user.get_full_name|default:user }} <i class="fa fa-user"></i></a></li>
|
||||
<li><a href="{% url 'common:current_user_details' %}" title="{% trans 'User details' %}">{{ request.user.get_full_name|default:request.user }} <i class="fa fa-user"></i></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user