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

Merge branch 'home' into 'dev'

Ajout du gid au sérialiser Adherent util pour la création des home

See merge request federez/re2o!217
This commit is contained in:
chirac 2018-08-16 19:59:25 +02:00
commit 62d86be364
2 changed files with 6 additions and 1 deletions

View file

@ -547,7 +547,7 @@ class AdherentSerializer(NamespacedHMSerializer):
fields = ('name', 'surname', 'pseudo', 'email', 'local_email_redirect',
'local_email_enabled', 'school', 'shell', 'comment',
'state', 'registered', 'telephone', 'room', 'solde',
'access', 'end_access', 'uid', 'api_url')
'access', 'end_access', 'uid', 'api_url','gid')
extra_kwargs = {
'shell': {'view_name': 'shell-detail'}
}

View file

@ -349,6 +349,11 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
""" Renvoie seulement le nom"""
return self.surname
@cached_property
def gid(self):
"""return the default gid of user"""
return LDAP['user_gid']
@property
def get_shell(self):
""" A utiliser de préférence, prend le shell par défaut