diff --git a/users/templates/users/aff_listright.html b/users/templates/users/aff_listright.html index be94b146..7807c1d3 100644 --- a/users/templates/users/aff_listright.html +++ b/users/templates/users/aff_listright.html @@ -33,6 +33,44 @@ with this program; if not, write to the Free Software Foundation, Inc., + {% if superuser_right %} + + Superuser + + True + + + + + Donne tous les droits sur Re2o. + + + + + + +
+
+
+
    + {% for user in superuser_right %} +
  • + {{user}} + + + +
  • + {% endfor %} +
+
+
+
+ + + + {% endif %} {% for listright in listright_list %} @@ -48,9 +86,9 @@ with this program; if not, write to the Free Software Foundation, Inc., - - - {{ listright.details }} + + + {{ listright.details }} {% include 'buttons/edit.html' with href='users:edit-listright' id=listright.id %} {% include 'buttons/history.html' with href='users:history' name='listright' id=listright.id %} diff --git a/users/views.py b/users/views.py index 2614cb9c..797b3eb2 100644 --- a/users/views.py +++ b/users/views.py @@ -768,10 +768,14 @@ def index_listright(request): """ Affiche l'ensemble des droits""" listright_list = ListRight.objects.order_by('unix_name')\ .prefetch_related('permissions').prefetch_related('user_set') + superuser_right = User.objects.filter(is_superuser=True) return render( request, 'users/index_listright.html', - {'listright_list': listright_list} + { + 'listright_list': listright_list, + 'superuser_right' : superuser_right, + } )