title: How to access the role of user in un-authenticated page in symfony2
body: <p>In my home page template <code>Index.html.twig</code> I have one navigation bar which i only want to show to Admin users if they are logged in , othwise not.</p>
  
  <p>I tried this</p>
  
  <pre><code>{% if is_granted('ROLE_ADMIN') %}
         &lt;div class="navigation"&gt;
         &lt;/div&gt;
  {% endif %}
  </code></pre>
  
  <p>But i get this error</p>
  
  <blockquote>
    <p>An exception has been thrown during the rendering of a template ("The
    security context contains no authentication token. One possible reason
    may be that there is no firewall configured for this URL.</p>
  </blockquote>
  
  <p>Now as this is home page i can't put it behind firewall. Is there any way to do it</p>