Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o
Commits
ded0aadb
Commit
ded0aadb
authored
Aug 04, 2018
by
grisel-davy
Committed by
chirac
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout du gid au sérialiser Adherent
parent
de5b6c90
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
api/serializers.py
api/serializers.py
+1
-1
users/models.py
users/models.py
+5
-0
No files found.
api/serializers.py
View file @
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'
}
}
...
...
users/models.py
View file @
ded0aadb
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment