Commit ded0aadb authored by grisel-davy's avatar grisel-davy Committed by chirac

Ajout du gid au sérialiser Adherent

parent de5b6c90
......@@ -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
@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
......
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