8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-26 06:32:26 +00:00

edit placement

This commit is contained in:
matthieu Michelet 2018-03-08 18:43:27 +01:00
parent 29779b3f1b
commit 2e9de93a86

View file

@ -284,8 +284,8 @@ class User(FieldPermissionModelMixin, AbstractBaseUser, PermissionsMixin):
@property @property
def is_admin(self): def is_admin(self):
admin,_ = Group.objects.get_or_create(name="admin")
""" Renvoie si l'user est admin""" """ Renvoie si l'user est admin"""
admin,_ = Group.objects.get_or_create(name="admin")
return self.is_superuser or admin in self.groups.all() return self.is_superuser or admin in self.groups.all()
def get_full_name(self): def get_full_name(self):