mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-26 22:52:26 +00:00
Ajout du gid au sérialiser Adherent
This commit is contained in:
parent
de5b6c903f
commit
ded0aadb9d
2 changed files with 6 additions and 1 deletions
|
@ -547,7 +547,7 @@ class AdherentSerializer(NamespacedHMSerializer):
|
||||||
fields = ('name', 'surname', 'pseudo', 'email', 'local_email_redirect',
|
fields = ('name', 'surname', 'pseudo', 'email', 'local_email_redirect',
|
||||||
'local_email_enabled', 'school', 'shell', 'comment',
|
'local_email_enabled', 'school', 'shell', 'comment',
|
||||||
'state', 'registered', 'telephone', 'room', 'solde',
|
'state', 'registered', 'telephone', 'room', 'solde',
|
||||||
'access', 'end_access', 'uid', 'api_url')
|
'access', 'end_access', 'uid', 'api_url','gid')
|
||||||
extra_kwargs = {
|
extra_kwargs = {
|
||||||
'shell': {'view_name': 'shell-detail'}
|
'shell': {'view_name': 'shell-detail'}
|
||||||
}
|
}
|
||||||
|
|
|
@ -349,6 +349,11 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
|
||||||
""" Renvoie seulement le nom"""
|
""" Renvoie seulement le nom"""
|
||||||
return self.surname
|
return self.surname
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def gid(self):
|
||||||
|
"""return the default gid of user"""
|
||||||
|
return LDAP['user_gid']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def get_shell(self):
|
def get_shell(self):
|
||||||
""" A utiliser de préférence, prend le shell par défaut
|
""" A utiliser de préférence, prend le shell par défaut
|
||||||
|
|
Loading…
Reference in a new issue