1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-07 03:04:01 +02:00

Move clef and listright to admin

This commit is contained in:
Alexandre Iooss
2019-08-08 14:55:20 +02:00
parent 70fde26afa
commit ec66f980e7
11 changed files with 20 additions and 359 deletions

View File

@ -48,9 +48,6 @@ class User(AbstractUser):
except Right.DoesNotExist:
return False
def has_right(self, right):
return Right.objects.filter(user=self).filter(right=ListRight.objects.get(listright=right)).exists()
@property
def is_adherent(self):
last_adh_year = Adhesion.objects.all().order_by('annee_debut').reverse().first()