Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
0b5902c9
Commit
0b5902c9
authored
9 months ago
by
Valentin Rigal
Browse files
Options
Downloads
Patches
Plain Diff
Add password validation when updating user
parent
86b1b64b
No related branches found
No related tags found
1 merge request
!2325
Perform password validation in UpdateUser
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex/users/serializers.py
+4
-0
4 additions, 0 deletions
arkindex/users/serializers.py
with
4 additions
and
0 deletions
arkindex/users/serializers.py
+
4
−
0
View file @
0b5902c9
...
...
@@ -54,6 +54,10 @@ class UserSerializer(SimpleUserSerializer):
"
auth_token
"
:
{
"
read_only
"
:
True
},
}
def
validate
(
self
,
data
):
data
=
super
().
validate
(
data
)
return
validate_user_password
(
self
.
context
[
"
request
"
].
user
,
data
)
@extend_schema_field
(
inline_serializer
(
name
=
"
Features
"
,
fields
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment