]> git.parisson.com Git - telemeta.git/commitdiff
add perms to access to users list and profile
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 20 May 2013 20:38:32 +0000 (22:38 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 20 May 2013 20:38:32 +0000 (22:38 +0200)
telemeta/templates/telemeta/base.html

index 64cce08099b58c4c7983f11029fb0376caa2e4c5..b029c9517951de51658b0bf0f74949777ed41180 100644 (file)
@@ -58,7 +58,9 @@
 {% else %}
 {{ user.username }} |
 {% endif %}
+{% if not perms.telemeta.cannot_view_users_and_profiles %}
 <a href="{% url telemeta-profile-detail user.username %}">{% trans "Profile" %}</a> |
+{% endif %}
 <a href="{% url telemeta-flatpage "help" %}">{% trans "Help" %}</a> |
 <a href="{% url telemeta-logout %}">{% trans "Sign out" %}
 <img src="{{ STATIC_URL }}telemeta/images/logout.png" alt="logout" style="vertical-align:middle" /></a>
  <li><a href="{% url telemeta-geo-continents %}" class="yellow">{% trans "Geo Navigator" %}</a></li>
 
  <li><a href="{% url telemeta-search-criteria %}" class="orange">{% trans "Advanced search" %}</a></li>
- {% if user.is_authenticated %}
+ {% if user.is_authenticated and not perms.telemeta.cannot_view_users_and_profiles %}
  <li><a href="{% url telemeta-users %}" class="red">{% trans "Users" %}</a></li>
  {% endif %}
  {% if user.is_staff %}