Commit 62d86be3 authored by chirac's avatar chirac

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
parents de5b6c90 ded0aadb
......@@ -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'}
......@@ -349,6 +349,11 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
""" Renvoie seulement le nom"""
return self.surname
def gid(self):
"""return the default gid of user"""
return LDAP['user_gid']
def get_shell(self):
""" A utiliser de préférence, prend le shell par défaut
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment