title: Get user group in a template
body: <p>I want to  display a menu that changes according to the user group of the currently logged in user, with this logic being inside of my view, and then set a variable to check in the template to determine which menu items to show....I'd asked this question before, but my logic was being done in the template.  So now I want it in my view...The menu looks as below</p>
  
  <pre><code>   &lt;ul class="sidemenu"&gt;
      &lt;li&gt;&lt;a href="/"&gt;General List &lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="/sales_list"&gt;Sales List &lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="/add_vehicle"&gt;Add a New Record &lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="/edit_vehicle"&gt;Edit Existing Record &lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="/filter"&gt;Filter Records &lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="/logout"&gt;Logout &lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  </code></pre>
  
  <p>Suppossing the user is management, they'll see everything...But assuming the user is in the group sales, they'll only see the first two and the last two items...and so on. I also want a dynamic redirect after login based on the user's group.  Any ideas?</p>