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
fe378e79
Commit
fe378e79
authored
Jul 19, 2018
by
Gabriel Detraz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Function for shadow expire
parent
cfa6fe09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
users/models.py
users/models.py
+9
-4
No files found.
users/models.py
View file @
fe378e79
...
...
@@ -321,6 +321,14 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
si il n'est pas défini"""
return
self
.
shell
or
OptionalUser
.
get_cached_value
(
'shell_default'
)
@
cached_property
def
get_shadow_expire
(
self
):
"""Return the shadow_expire value for the user"""
if
self
.
state
==
self
.
STATE_DISABLED
:
return
str
(
0
)
else
:
return
None
def
end_adhesion
(
self
):
""" Renvoie la date de fin d'adhésion d'un user. Examine les objets
cotisation"""
...
...
@@ -522,10 +530,7 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser,
user_ldap
.
sambat_nt_password
=
self
.
pwd_ntlm
.
upper
()
if
self
.
get_shell
:
user_ldap
.
login_shell
=
str
(
self
.
get_shell
)
if
self
.
state
==
self
.
STATE_DISABLED
:
user_ldap
.
shadowexpire
=
str
(
0
)
else
:
user_ldap
.
shadowexpire
=
None
user_ldap
.
shadowexpire
=
self
.
get_shadow_expire
if
access_refresh
:
user_ldap
.
dialupAccess
=
str
(
self
.
has_access
())
if
mac_refresh
:
...
...
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