Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #415 opened Jun 03, 2015 by Bach Dániel@bachdaniel 
  • Report abuse
  • New issue
Report abuse New issue

request.user vs user in templates

robot

diff --git a/circle/dashboard/templates/dashboard/base.html b/circle/dashboard/templates/dashboard/base.html
index 41c88ed..3762cbd 100644
--- a/circle/dashboard/templates/dashboard/base.html
+++ b/circle/dashboard/templates/dashboard/base.html
@@ -11,9 +11,9 @@


 {% block navbar %}
-{% if user.is_authenticated and user.pk and not request.token_user %}
+{% if request.user.is_authenticated and request.user.pk and not request.token_user %}
   <ul class="nav navbar-nav navbar-right" id="dashboard-menu">
-    {% if user.is_superuser %}
+    {% if request.user.is_superuser %}
     {% if ADMIN_ENABLED %}
     <li>
       <a href="/admin/">
@@ -56,7 +56,7 @@
     <li>
       <a href="{% url "dashboard.views.profile-preferences" %}">
         <i class="fa fa-user"></i>
-        {% include "dashboard/_display-name.html" with user=user show_org=True %}
+        {% include "dashboard/_display-name.html" with user=request.user show_org=True %}
       </a>
     </li>
     <li>
@@ -89,7 +89,7 @@
     </li>
     <li class="hidden-xs">
       <a href="{% url "dashboard.views.profile-preferences" %}">
-        <img class="profile-avatar" src="{{ user.profile.get_avatar_url }}" />
+        <img class="profile-avatar" src="{{ request.user.profile.get_avatar_url }}" />
       </a>
     </li>
   </ul>
  • Kálmán Viktor @kviktor

    mentioned in commit 96b3ed43

    Jun 05, 2015

    mentioned in commit 96b3ed43

    mentioned in commit 96b3ed439c667bf93ad6fc203a38baea47bf65af
    Toggle commit list
  • Kálmán Viktor @kviktor

    mentioned in merge request !337 (merged)

    Jun 05, 2015

    mentioned in merge request !337 (merged)

    mentioned in merge request !337
    Toggle commit list
  • Guba Sándor @gubasandor

    mentioned in commit 8b3c3140

    Jun 09, 2015

    mentioned in commit 8b3c3140

    mentioned in commit 8b3c31400992b61b9e05829096930f78b612d473
    Toggle commit list
  • Kálmán Viktor @kviktor

    Status changed to closed

    Jun 16, 2015

    Status changed to closed

    Status changed to closed
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
1
Labels
critical
Assign labels
  • View labels
3
3 participants
Reference: circle/cloud#415