]> git.parisson.com Git - telemeta.git/commitdiff
fix permissions for profile views
authorGuillaume Pellerin <yomguy@parisson.com>
Fri, 24 May 2013 13:26:44 +0000 (15:26 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Fri, 24 May 2013 13:26:44 +0000 (15:26 +0200)
telemeta/models/system.py
telemeta/templates/telemeta/base.html

index d1b64d5f6509d495396c27f082ed1d4cb745529f..f58a7c187c9a71f1ea8652cf76cf38511614d040 100644 (file)
@@ -92,7 +92,7 @@ class UserProfile(models.Model):
 
     class Meta(MetaCore):
         db_table = 'profiles'
-        permissions = (("can_not_view_users_and_profiles", "Cannot view other users and any profile"),)
+        permissions = (("can_view_users_and_profiles", "Can view other users and any profile"),)
 
 
 class Criteria(ModelCore):
index a7b566450aef4b662c90560fad208e11db99c5fe..f663ba8344230f83fa74aa007cc9f8f43e0b87e5 100644 (file)
@@ -58,7 +58,7 @@
 {% else %}
 {{ user.username }} |
 {% endif %}
-{% if not perms.telemeta.can_not_view_users_and_profiles %}
+{% if perms.telemeta.can_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> |
@@ -84,7 +84,7 @@
 {# spaces between li and a elements breaks layout #}
 
 <ul id="nav">
- {% if user.is_authenticated and not perms.telemeta.can_not_view_users_and_profiles %}
+ {% if user.is_authenticated and perms.telemeta.can_view_users_and_profiles %}
   <li><a href="#desk#" class="blue">{% trans "Desk" %}</a>
    <ul>
     <li><a href="{% url telemeta-desk-lists %}">{% trans "Lists" %}</a></li>
  <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 and not perms.telemeta.can_not_view_users_and_profiles %}
+ {% if user.is_authenticated and perms.telemeta.can_view_users_and_profiles %}
  <li><a href="{% url telemeta-users %}" class="red">{% trans "Users" %}</a></li>
  {% endif %}
  {% if user.is_staff %}