Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
feudal
feudalBackend
Commits
28923b29
Commit
28923b29
authored
Mar 16, 2018
by
Lukas Burgey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add password upgrade for clients
parent
77c2f178
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
django_backend/backend/models.py
django_backend/backend/models.py
+6
-0
No files found.
django_backend/backend/models.py
View file @
28923b29
...
...
@@ -625,6 +625,12 @@ class DeploymentTaskItem(models.Model):
# RECEIVERS
#
@
receiver
(
post_save
,
sender
=
User
)
def
upgrade_password
(
sender
,
instance
=
None
,
created
=
False
,
**
kwargs
):
if
created
and
instance
is
not
None
and
instance
.
user_type
==
'apiclient'
:
instance
.
set_password
(
instance
.
password
)
instance
.
save
()
@
receiver
(
post_save
,
sender
=
User
)
def
deactivate_user
(
sender
,
instance
=
None
,
created
=
False
,
**
kwargs
):
if
created
:
...
...
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