From 70fde26afa589fbe51aff800285bd893fa17382d Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Thu, 8 Aug 2019 13:42:47 +0200 Subject: [PATCH] Fix staff permissions --- users/admin.py | 2 +- users/models.py | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/users/admin.py b/users/admin.py index a98e97b..87c3620 100644 --- a/users/admin.py +++ b/users/admin.py @@ -19,7 +19,7 @@ class RightAdmin(VersionAdmin): class ClefAdmin(VersionAdmin): - list_display = ('proprio', 'nom') + list_display = ('nom', 'proprio') class AdhesionAdmin(VersionAdmin): diff --git a/users/models.py b/users/models.py index e854fd3..26955aa 100644 --- a/users/models.py +++ b/users/models.py @@ -48,16 +48,9 @@ class User(AbstractUser): except Right.DoesNotExist: return False - def has_perm(self, perm, obj=None): - return True - def has_right(self, right): return Right.objects.filter(user=self).filter(right=ListRight.objects.get(listright=right)).exists() - def has_module_perms(self, app_label): - # Simplest version again - return True - @property def is_adherent(self): last_adh_year = Adhesion.objects.all().order_by('annee_debut').reverse().first()