From 3b2ca10e292ca86ae5bf98ed39883d659d24be58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Wed, 27 Jun 2018 12:21:20 +0000 Subject: [PATCH 001/118] Fix #109: Remove misnamed rights --- .../0083_remove_duplicate_rights.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 machines/migrations/0083_remove_duplicate_rights.py diff --git a/machines/migrations/0083_remove_duplicate_rights.py b/machines/migrations/0083_remove_duplicate_rights.py new file mode 100644 index 00000000..05ad2938 --- /dev/null +++ b/machines/migrations/0083_remove_duplicate_rights.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations + +def remove_permission_alias(apps, schema_editor): + Permission = apps.get_model('auth', 'Permission') + for codename in ['add_alias', 'change_alias', 'delete_alias']: + # Retrieve the wrong permission + try: + to_remove = Permission.objects.get( + codename=codename, + content_type__model='domain' + ) + except Permission.DoesNotExist: + # The permission is missing so no problem + pass + else: + to_remove.delete() + + +def remove_permission_text(apps, schema_editor): + Permission = apps.get_model('auth', 'Permission') + for codename in ['add_text', 'change_text', 'delete_text']: + # Retrieve the wrong permission + try: + to_remove = Permission.objects.get( + codename=codename, + content_type__model='txt' + ) + except Permission.DoesNotExist: + # The permission is missing so no problem + pass + else: + to_remove.delete() + + +class Migration(migrations.Migration): + + dependencies = [ + ('machines', '0082_auto_20180525_2209'), + ] + + operations = [ + migrations.RunPython(remove_permission_text), + migrations.RunPython(remove_permission_alias), + ] From 5706e9064ebffe9f0e1d4e8eb72644524ecaa355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Sun, 29 Apr 2018 14:37:18 +0000 Subject: [PATCH 002/118] Fix #117 : Use unix_name instead of name for ldap groups A group in the LDAP now use the `unix_name` instead of the `name` The `new_group` form has now a more logical order for the fields The label for the `unix_name` is now more explicit --- users/forms.py | 13 +++++++------ users/models.py | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/users/forms.py b/users/forms.py index 8c6f5db9..670fbb98 100644 --- a/users/forms.py +++ b/users/forms.py @@ -501,7 +501,7 @@ class ShellForm(FormRevMixin, ModelForm): class ListRightForm(FormRevMixin, ModelForm): """Edition, d'un groupe , équivalent à un droit - Ne peremet pas d'editer le gid, car il sert de primary key""" + Ne permet pas d'editer le gid, car il sert de primary key""" permissions = forms.ModelMultipleChoiceField( Permission.objects.all().select_related('content_type'), widget=forms.CheckboxSelectMultiple, @@ -510,23 +510,24 @@ class ListRightForm(FormRevMixin, ModelForm): class Meta: model = ListRight - fields = ['name', 'unix_name', 'critical', 'permissions', 'details'] + fields = ('name', 'unix_name', 'critical', 'permissions', 'details') def __init__(self, *args, **kwargs): prefix = kwargs.pop('prefix', self.Meta.model.__name__) super(ListRightForm, self).__init__(*args, prefix=prefix, **kwargs) - self.fields['unix_name'].label = 'Nom du droit/groupe' + self.fields['unix_name'].label = 'Nom UNIX du groupe' class NewListRightForm(ListRightForm): """Ajout d'un groupe/list de droit """ class Meta(ListRightForm.Meta): - fields = '__all__' + fields = ('name', 'unix_name', 'gid', 'critical', 'permissions', + 'details') def __init__(self, *args, **kwargs): super(NewListRightForm, self).__init__(*args, **kwargs) - self.fields['gid'].label = 'Gid, attention, cet attribut ne doit\ - pas être modifié après création' + self.fields['gid'].label = ("Gid, attention, cet attribut ne doit " + "pas être modifié après création") class DelListRightForm(Form): diff --git a/users/models.py b/users/models.py index d0e21997..0284985c 100644 --- a/users/models.py +++ b/users/models.py @@ -1175,7 +1175,7 @@ class ListRight(RevMixin, AclMixin, Group): group_ldap = LdapUserGroup.objects.get(gid=self.gid) except LdapUserGroup.DoesNotExist: group_ldap = LdapUserGroup(gid=self.gid) - group_ldap.name = self.listright + group_ldap.name = self.unix_name group_ldap.members = [user.pseudo for user in self.user_set.all()] group_ldap.save() From 05a53b1c9c62659b65a67ef4b01845a2b3887a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Mon, 28 May 2018 10:19:59 +0000 Subject: [PATCH 003/118] Add reload to do in CHANGELOG --- CHANGELOG.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01b9b8ca..9e08597f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ ## MR 160: Datepicker Install libjs-jquery libjs-jquery-ui libjs-jquery-timepicker libjs-bootstrap javascript-common -``` +```bash apt-get -y install \ libjs-jquery \ libjs-jquery-ui \ @@ -10,12 +10,12 @@ apt-get -y install \ javascript-common ``` Enable javascript-common conf -``` +```bash a2enconf javascript-common ``` Delete old jquery files : -``` +```bash rm -r static_files/js/jquery-ui-* rm static_files/js/jquery-2.2.4.min.js rm static/css/jquery-ui-timepicker-addon.css @@ -42,6 +42,7 @@ Refactored install_re2o.sh script. ``` install_re2o.sh help ``` + * The installation templates (LDIF files and `re2o/settings_locale.example.py`) have been changed to use `example.net` instead of `example.org` (more neutral and generic) @@ -75,7 +76,6 @@ OPTIONAL_APPS = ( ``` - ## MR 177: Add django-debug-toolbar support Add the possibility to enable `django-debug-toolbar` in debug mode. First install the APT package: @@ -94,3 +94,26 @@ If you to restrict the IP which can see the debug, use the `INTERNAL_IPS` option ``` INTERNAL_IPS = ["10.0.0.1", "10.0.0.2"] ``` + + +## MR 145: Fix #117 : Use unix_name instead of name for ldap groups + +Fix a mixing between unix_name and name for groups +After this modification you need to: +* Double-check your defined groups' unix-name only contain small letters +* Run the following commands to rebuild your ldap's groups: + ```shell + # In the LDAP shell : + ou=groups,ou=posix > rm * + ``` + ```python + # In the Django shell + >>> from users.model import ListRight + >>> for lr in ListRight.objects.all(): + ... lr.ldap_sync() + ``` + +* You may need to force your nslcd cache to be reloaded on some servers (else you will have to wait for the cache to be refreshed): + ```bash + sudo nslcd -i groups + ``` From 4cbb05d29400ac9f728d7989c5e969b892ce3950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Sat, 7 Jul 2018 18:01:04 +0000 Subject: [PATCH 004/118] Add a Django command to fully rebuild the LDAP --- CHANGELOG.md | 9 +-- users/management/commands/ldap_rebuild.py | 98 +++++++++++++++++++++++ 2 files changed, 99 insertions(+), 8 deletions(-) create mode 100644 users/management/commands/ldap_rebuild.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e08597f..ceb56d7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -103,14 +103,7 @@ After this modification you need to: * Double-check your defined groups' unix-name only contain small letters * Run the following commands to rebuild your ldap's groups: ```shell - # In the LDAP shell : - ou=groups,ou=posix > rm * - ``` - ```python - # In the Django shell - >>> from users.model import ListRight - >>> for lr in ListRight.objects.all(): - ... lr.ldap_sync() + python3 manage.py ldap_rebuild ``` * You may need to force your nslcd cache to be reloaded on some servers (else you will have to wait for the cache to be refreshed): diff --git a/users/management/commands/ldap_rebuild.py b/users/management/commands/ldap_rebuild.py new file mode 100644 index 00000000..a386b080 --- /dev/null +++ b/users/management/commands/ldap_rebuild.py @@ -0,0 +1,98 @@ +# Copyright © 2018 Maël Kervella +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +import subprocess +from base64 import decodebytes + +from django.core.management.base import BaseCommand, CommandError +from django.conf import settings + +from users.models import User, ListRight + + +def flush_ldap(binddn, bindpass, server, usersdn, groupsdn): + """ + Perform the python (and more understandable) equivalent of the following commands: + + ldapsearch -A -s one -D $binddn -w $bindpass -H $server -b $usersdn dn \ + | grep "dn: " | sed -e 's/dn: //g' \ + | ldapdelete -v -D $binddn -w $bindpass -H $server -- + ldapsearch -A -s one -D $binddn -w $bindpass -H $server -b $usersdn dn \ + | grep "dn:: " | sed -e 's/dn:: //g' \ + | while read x; do echo "$x" | base64 -d; echo ""; done \ + | ldapdelete -v -D $binddn -w $bindpass -H $server -- + ldapsearch -A -s one -D $binddn -w $bindpass -H $server -b $groupsdn dn \ + | grep "dn: " | sed -e 's/dn: //g' \ + | ldapdelete -v -D $binddn -w $bindpass -H $server -- + ldapsearch -A -s one -D $binddn -w $bindpass -H $server -b $groupsdn dn \ + | grep "dn:: " | sed -e 's/dn:: //g' \ + | while read x; do echo "$x" | base64 -d; echo ""; done \ + | ldapdelete -v -D $binddn -w $bindpass -H $server -- + """ + + to_remove = [] + + for lookup in (usersdn, groupsdn): + search_cmd = [ + 'ldapsearch', + '-A', + '-s', 'one', + '-D', binddn, + '-w', bindpass, + '-H', server, + '-b', lookup, + 'dn' + ] + for line in subprocess.check_output(search_cmd).split(b'\n'): + if line.startswith(b'dn: '): + to_remove.append(line[len(b'dn: '):]) + elif line.startswith(b'dn:: '): + # Non ASCII value ares are base64-encoded + to_remove.append(decodebytes(line[len(b'dn:: '):])) + + delete_cmd = [ + 'ldapdelete', + '-D', binddn, + '-w', bindpass, + '-H', server + ] + to_remove + subprocess.check_call(delete_cmd) + + +def sync_ldap(): + """Syncrhonize the whole LDAP with the DB.""" + for u in User.objects.all(): + u.ldap_sync() + for lr in ListRight.objects.all(): + lr.ldap_sync() + + +class Command(BaseCommand): + help = ('Destroy the current LDAP data and rebuild it from the DB data. ' + 'Use with caution.') + + def handle(self, *args, **options): + + usersdn = settings.LDAP['base_user_dn'] + groupsdn = settings.LDAP['base_usergroup_dn'] + binddn = settings.DATABASES['ldap']['USER'] + bindpass = settings.DATABASES['ldap']['PASSWORD'] + server = settings.DATABASES['ldap']['NAME'] + + flush_ldap(binddn, bindpass, server, usersdn, groupsdn) + self.stdout.write("LDAP emptied") + sync_ldap() + self.stdout.write("LDAP rebuilt") From 19f1e28308f592aa8b4df6b5d7cb505ab5dbd642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Wed, 27 Jun 2018 19:37:13 +0000 Subject: [PATCH 005/118] Refactor display of rights in users/listright page --- static/css/base.css | 6 + users/templates/users/aff_listright.html | 277 ++++++++++++--------- users/templates/users/index_listright.html | 3 +- users/views.py | 24 +- 4 files changed, 191 insertions(+), 119 deletions(-) diff --git a/static/css/base.css b/static/css/base.css index f6240970..2b44e95c 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -108,3 +108,9 @@ footer a { overflow-y: visible; } +/* Make modal wider on wide screens */ +@media (min-width: 1024px) { + .modal-dialog { + width: 1000px + } +} diff --git a/users/templates/users/aff_listright.html b/users/templates/users/aff_listright.html index 8906b38e..14c9fc44 100644 --- a/users/templates/users/aff_listright.html +++ b/users/templates/users/aff_listright.html @@ -22,118 +22,173 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. {% endcomment %} - - - - - - - - - - - - {% if superuser_right %} - - - - - - - - - - - + + + + +{% endif %} - {% endif %} - {% for listright in listright_list %} - - - - - - - - - - - - {% endfor %} -
DroitGidGroupe/permission critiqueInformationsDetails
SuperuserTrue - - - Donne tous les droits sur Re2o. - -
-
-
-
-
    - {% for user in superuser_right %} -
  • - {{user}} - - - -
  • - {% endfor %} -
-
-
+ +
+
- {{ listright.name }} - {{ listright.gid }}{{ listright.critical }} - - {{ 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 %} -
-
-
-
-
    - {% for perm in listright.permissions.all %} -
  • - {{perm.name}} -
  • - {% endfor %} -
-
-
-
-
-
    - {% for user in listright.user_set.all %} -
  • - {{user}} - - - -
  • - {% endfor %} -
-
-
+{% for right, users in rights.items %} +
+
+
+ {% if users %} + + {{users.count}} + + {% else %} + {{users.count}} + {% endif %} + {% include 'buttons/edit.html' with href='users:edit-listright' id=right.id %} + {% include 'buttons/history.html' with href='users:history' name='listright' id=right.id %} +
+

+ + {{right.name}} ({{ right.gid }}) +

+ {{ right.details }} +
+
+
+

Total: {{ right.permissions.count }} permissions

+
    + {% for perm in right.permissions.all %} +
  • + {{perm.name}} +
  • + {% endfor %} +
+
+
+
+ +{% if users %} +
- - + + + + +{% endif %} +{% endfor %} diff --git a/users/templates/users/index_listright.html b/users/templates/users/index_listright.html index 57165792..3b8b3e60 100644 --- a/users/templates/users/index_listright.html +++ b/users/templates/users/index_listright.html @@ -34,9 +34,8 @@ with this program; if not, write to the Free Software Foundation, Inc., Ajouter un droit ou groupe {% acl_end %} Supprimer un ou plusieurs droits/groupes - {% include "users/aff_listright.html" with listright_list=listright_list %} -


+ {% include "users/aff_listright.html" %} {% endblock %} diff --git a/users/views.py b/users/views.py index fcb44f65..b427f710 100644 --- a/users/views.py +++ b/users/views.py @@ -39,7 +39,7 @@ from django.urls import reverse from django.shortcuts import get_object_or_404, render, redirect from django.contrib import messages from django.contrib.auth.decorators import login_required, permission_required -from django.db.models import ProtectedError +from django.db.models import ProtectedError, Count, Max from django.utils import timezone from django.db import transaction from django.http import HttpResponse @@ -806,15 +806,27 @@ def index_shell(request): @can_view_all(ListRight) 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) + rights = {} + for right in (ListRight.objects + .order_by('name') + .prefetch_related('permissions') + .prefetch_related('user_set') + ): + rights[right] = (right.user_set + .annotate(action_number=Count('revision'), + last_seen=Max('revision__date_created')) + ) + superusers = (User.objects + .filter(is_superuser=True) + .annotate(action_number=Count('revision'), + last_seen=Max('revision__date_created')) + ) return render( request, 'users/index_listright.html', { - 'listright_list': listright_list, - 'superuser_right' : superuser_right, + 'rights': rights, + 'superusers' : superusers, } ) From e5f9b634a01677fc13a49a02f3a2b419cda23fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Wed, 27 Jun 2018 19:42:28 +0000 Subject: [PATCH 006/118] Remove logs/stats_droit --- logs/templates/logs/aff_stats_droits.html | 86 ----------------------- logs/templates/logs/sidebar.html | 4 -- logs/templates/logs/stats_droits.html | 36 ---------- logs/urls.py | 1 - logs/views.py | 24 ------- 5 files changed, 151 deletions(-) delete mode 100644 logs/templates/logs/aff_stats_droits.html delete mode 100644 logs/templates/logs/stats_droits.html diff --git a/logs/templates/logs/aff_stats_droits.html b/logs/templates/logs/aff_stats_droits.html deleted file mode 100644 index 6e424223..00000000 --- a/logs/templates/logs/aff_stats_droits.html +++ /dev/null @@ -1,86 +0,0 @@ -{% comment %} -Re2o est un logiciel d'administration développé initiallement au rezometz. Il -se veut agnostique au réseau considéré, de manière à être installable en -quelques clics. - -Copyright © 2017 Gabriel Détraz -Copyright © 2017 Goulven Kermarec -Copyright © 2017 Augustin Lemesle - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -{% endcomment %} - -{% load bootstrap3 %} -{% load acl %} - -{% for droit,users in stats_list.items %} -
-
-

- - {{droit}} - {{users.count}} -

-
-
-
-
- - - - - - - - - - - - {% for utilisateur in users %} - - - {% if utilisateur.is_adherent %} - - {% elif not utilisateur.end_adhesion %} - - {% else %} - - {% endif %} - - - {% if not utilisateur.last %} - - {% else %} - - {% endif %} - - - {% endfor %} -
PseudoAdhésionDerniere connexionNombre d'actionsDate de la dernière action
{{ utilisateur.pseudo }}

Adhérent

On ne s'en souvient plus...

Plus depuis {{ utilisateur.end_adhesion }}

{{ utilisateur.last_login }}{{ utilisateur.num }}

Jamais

{{utilisateur.last}}

- {% if droit != 'Superuser' %} - - {% else %} - - {% endif %} - - -
-
-
-
-
-{% endfor %} diff --git a/logs/templates/logs/sidebar.html b/logs/templates/logs/sidebar.html index 03a4bd73..0e3048e3 100644 --- a/logs/templates/logs/sidebar.html +++ b/logs/templates/logs/sidebar.html @@ -51,9 +51,5 @@ with this program; if not, write to the Free Software Foundation, Inc., Utilisateurs - - - Groupes de droit - {% acl_end %} {% endblock %} diff --git a/logs/templates/logs/stats_droits.html b/logs/templates/logs/stats_droits.html deleted file mode 100644 index 76c20331..00000000 --- a/logs/templates/logs/stats_droits.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "logs/sidebar.html" %} -{% comment %} -Re2o est un logiciel d'administration développé initiallement au rezometz. Il -se veut agnostique au réseau considéré, de manière à être installable en -quelques clics. - -Copyright © 2017 Gabriel Détraz -Copyright © 2017 Goulven Kermarec -Copyright © 2017 Augustin Lemesle - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along -with this program; if not, write to the Free Software Foundation, Inc., -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -{% endcomment %} - -{% load bootstrap3 %} - -{% block title %}Statistiques des droits{% endblock %} - -{% block content %} -

Statistiques des droits

- {% include "logs/aff_stats_droits.html" with stats_list=stats_list %} -
-
-
- {% endblock %} diff --git a/logs/urls.py b/logs/urls.py index 98dec281..11009835 100644 --- a/logs/urls.py +++ b/logs/urls.py @@ -39,5 +39,4 @@ urlpatterns = [ url(r'^stats_models/$', views.stats_models, name='stats-models'), url(r'^stats_users/$', views.stats_users, name='stats-users'), url(r'^stats_actions/$', views.stats_actions, name='stats-actions'), - url(r'^stats_droits/$', views.stats_droits, name='stats-droits'), ] diff --git a/logs/views.py b/logs/views.py index 1fdda9fb..cdbad9ac 100644 --- a/logs/views.py +++ b/logs/views.py @@ -453,27 +453,3 @@ def stats_actions(request): }, } return render(request, 'logs/stats_users.html', {'stats_list': stats}) - - -@login_required -@can_view_app('users') -def stats_droits(request): - """Affiche la liste des droits et les users ayant chaque droit""" - stats_list = {} - - for droit in ListRight.objects.all().select_related('group_ptr'): - stats_list[droit] = droit.user_set.all().annotate( - num=Count('revision'), - last=Max('revision__date_created'), - ) - - stats_list['Superuser'] = User.objects.filter(is_superuser=True).annotate( - num=Count('revision'), - last=Max('revision__date_created'), - ) - - return render( - request, - 'logs/stats_droits.html', - {'stats_list': stats_list} - ) From 4eeb8802f6eb0f38e4ee57fb7f95e9116da19cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Wed, 27 Jun 2018 21:17:29 +0000 Subject: [PATCH 007/118] Use button instead of badge --- users/templates/users/aff_listright.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/users/templates/users/aff_listright.html b/users/templates/users/aff_listright.html index 14c9fc44..c0c83c0b 100644 --- a/users/templates/users/aff_listright.html +++ b/users/templates/users/aff_listright.html @@ -28,8 +28,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,

@@ -106,12 +106,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% if users %} - - {{users.count}} - + {% else %} - {{users.count}} + {% endif %} + {{users.count}} + {% include 'buttons/edit.html' with href='users:edit-listright' id=right.id %} {% include 'buttons/history.html' with href='users:history' name='listright' id=right.id %}
From 6df493cfb9bb78a84959771b9db88bd60780e34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Wed, 27 Jun 2018 21:25:22 +0000 Subject: [PATCH 008/118] Display "gid: " --- users/templates/users/aff_listright.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/templates/users/aff_listright.html b/users/templates/users/aff_listright.html index c0c83c0b..37d13bd1 100644 --- a/users/templates/users/aff_listright.html +++ b/users/templates/users/aff_listright.html @@ -117,7 +117,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,

- {{right.name}} ({{ right.gid }}) + {{right.name}} (gid: {{ right.gid }})

{{ right.details }}
From 324b48d37ae623cc7d13cdf538b47d5f142217f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Wed, 27 Jun 2018 22:08:28 +0000 Subject: [PATCH 009/118] Translate new right page --- users/locale/fr/LC_MESSAGES/django.mo | Bin 0 -> 1499 bytes users/locale/fr/LC_MESSAGES/django.po | 123 +++++++++++++++++++++++ users/templates/users/aff_listright.html | 38 +++++-- 3 files changed, 150 insertions(+), 11 deletions(-) create mode 100644 users/locale/fr/LC_MESSAGES/django.mo create mode 100644 users/locale/fr/LC_MESSAGES/django.po diff --git a/users/locale/fr/LC_MESSAGES/django.mo b/users/locale/fr/LC_MESSAGES/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..9808ced65ede1f1f5db7688f356b2ff90c3145c7 GIT binary patch literal 1499 zcmcJO%WfP+6o!jjAQ>)!LIzylz52qYF*h$Rv`1oH^2*sx{8h9zRdU)?hqL>922q?)hl^yzc!e||ZC>Jx?a z4E77yUt&LtedQ7SV0{F>41Nqg27Uu>fZu|TgMWZ$!P6&{dK5edcEC&EY49cRB6u0R z1g?V7zYng1A5QFFfM;<34vhJK0MCOzgC8KrZ(ywBty66scfoDk1$-L(5xfBY1jhKk zPWU?*>-rOnekV}WbKnIq`dtCn!6ooT@Cc0lpMnH_20jmd526f(GMYI6%|h5_c5xPP zQBO72b_P%29D6!9u|=H3j&;QKBzCMJ=2NfCc{3P>eXB=2FElqWMMhI2F7q<4*79JS z6}5Rs+kv|*Bo*i8z~oeUP6|FSmJ4d)P#Ee!QdjH+Hf@i{g(3U)sVt~lS_0`NV0#v3 zt9m@T&3*zIno4c+Aq?A&M$MyWBhR_>g}{mw#^#Jd*%teS4yawd7qixa*ZMB#GPVK3 zXg_zg4d^Xij0jr!R|lDTtd-^8-V?Ql@NrblLCDw#vuX!8v(Kv8@$L@iA-P#3?_(^; zpHX+=T4$Fl=R?vHj5%4a2a@z%MxC8^`^ko99cP|wqBVG@i_1y6lysLVO|x|A)wG+Y za7=dj(8PfM^n0DUSF@|vTE95*r0=zrQU~WV>gn;b!QXN&OIq?1PT2*ReS12E9 z$RVum^|zAcnO`jFfPHeq=B_YykkRsO6FNI(?RA-KIX{w&Y}H(4wYx&?adpnpby}QX z>8Pnt|C4&XGXaVn9~a|eNY+5cpnU}GqJDP-$K-ma9udH7ffjc(yKj6!dH4o\n" +"Language-Team: \n" +"Language: fr_FR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: templates/users/aff_listright.html:37 +msgid "Superuser" +msgstr "Superuser" + +#: templates/users/aff_listright.html:39 +msgid "Django's specific pre-defined right that supersed any other rights." +msgstr "" +"Droit prédéfini spécifique à Django qui outrepasse tous les autres droits." + +#: templates/users/aff_listright.html:43 +msgid "Total: All permissions" +msgstr "Total: Toutes les permissions" + +#: templates/users/aff_listright.html:55 +msgid "Users in Superuser" +msgstr "Utilisateurs dans Superuser" + +#: templates/users/aff_listright.html:62 templates/users/aff_listright.html:167 +msgid "Username" +msgstr "Pseudo" + +#: templates/users/aff_listright.html:63 templates/users/aff_listright.html:168 +msgid "Membership" +msgstr "Adhésion" + +#: templates/users/aff_listright.html:64 templates/users/aff_listright.html:169 +msgid "Last seen" +msgstr "Dernière connexion" + +#: templates/users/aff_listright.html:65 templates/users/aff_listright.html:170 +msgid "Actions" +msgstr "Actions" + +#: templates/users/aff_listright.html:66 templates/users/aff_listright.html:171 +msgid "Last action" +msgstr "Dernière action" + +#: templates/users/aff_listright.html:74 templates/users/aff_listright.html:179 +msgid "Member" +msgstr "Adhérent" + +#: templates/users/aff_listright.html:76 templates/users/aff_listright.html:181 +msgid "No membership records" +msgstr "Aucune adhésion" + +#: templates/users/aff_listright.html:79 templates/users/aff_listright.html:184 +#, python-format +msgid "Not since %(end_date)s" +msgstr "Plus depuis %(end_date)s" + +#: templates/users/aff_listright.html:87 templates/users/aff_listright.html:192 +msgid "Never" +msgstr "Jamais" + +#: templates/users/aff_listright.html:122 +#, python-format +msgid "%(right_name)s (gid: %(right_gid)s)" +msgstr "%(right_name)s (gid: %(right_gid)s)" + +#: templates/users/aff_listright.html:131 +#, python-format +msgid "Total: %(perm_count)s permission" +msgid_plural "Total: %(perm_count)s permissions" +msgstr[0] "Total: %(perm_count)s permission" +msgstr[1] "Total: %(perm_count)s permissions" + +#: templates/users/aff_listright.html:157 +#, python-format +msgid "Users in %(right_name)s" +msgstr "Utilisateurs dans %(right_name)s" + +#: widgets.py:35 +msgid "Close" +msgstr "" + +#: widgets.py:36 +msgid "Today" +msgstr "" + +#: widgets.py:44 +msgid "Next" +msgstr "" + +#: widgets.py:45 +msgid "Previous" +msgstr "" + +#: widgets.py:46 +msgid "Wk" +msgstr "" diff --git a/users/templates/users/aff_listright.html b/users/templates/users/aff_listright.html index 37d13bd1..3c7137bf 100644 --- a/users/templates/users/aff_listright.html +++ b/users/templates/users/aff_listright.html @@ -34,25 +34,25 @@ with this program; if not, write to the Free Software Foundation, Inc.,

- Superuser + {% trans "Superuser" %}

- Django's specific pre-defined right that supersed any other rights. + {% trans "Django's specific pre-defined right that supersed any other rights." %}
-

Total: All permissions

+

{% trans "Total: All permissions" %}

-