diff --git a/content/models.py b/content/models.py
index 99a61f4..6c5b204 100644
--- a/content/models.py
+++ b/content/models.py
@@ -48,3 +48,6 @@ class Content(models.Model):
def __str__(self):
return self.name
+
+ def manager_right(self):
+ return 'users.manage_' + str(self.school_owner.group.pk)
diff --git a/content/templates/content/content.html b/content/templates/content/content.html
index 3f86de4..3785644 100644
--- a/content/templates/content/content.html
+++ b/content/templates/content/content.html
@@ -6,12 +6,14 @@
{{content.name}}
Contenu proposé par {{content.school_owner.group.name}}
+ {% if content.manager_right in perms %}
+ {% endif %}
diff --git a/users/templates/users/school.html b/users/templates/users/school.html
index 79d7a88..e76fd7f 100644
--- a/users/templates/users/school.html
+++ b/users/templates/users/school.html
@@ -5,13 +5,14 @@
diff --git a/users/views.py b/users/views.py
index b9ad3f9..a939e8f 100644
--- a/users/views.py
+++ b/users/views.py
@@ -161,7 +161,7 @@ class School(LoginRequiredMixin, PermissionRequiredMixin, DetailView):
context['contents'] = Content.objects.filter(school_owner=self.object.school)
context['school'] = True
context['members'] = User.objects.filter(userprofile__school=self.object.school)
- context['manager_right'] = 'auth.manage_' + str(self.object.pk)
+ context['manager_right'] = 'users.manage_' + str(self.object.pk)
context['manager_group'],_ = Group.objects.get_or_create(name=str(self.object.pk)+'_admins')
return context