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

Continue to remove old perm system

This commit is contained in:
Alexandre Iooss
2019-08-08 19:16:54 +02:00
parent deb28aa93b
commit d0086c84e8
28 changed files with 423 additions and 695 deletions

View File

@ -41,14 +41,6 @@ class User(AbstractUser):
REQUIRED_FIELDS = ['first_name', 'last_name', 'email']
def has_perms(self, perms, obj=None):
for perm in perms:
try:
Right.objects.get(user=self, right__listright=perm)
return True
except Right.DoesNotExist:
return False
@property
def is_adherent(self):
last_adh_year = Adhesion.objects.all().order_by(