Skip to content
Snippets Groups Projects
Commit 0b5902c9 authored by Valentin Rigal's avatar Valentin Rigal
Browse files

Add password validation when updating user

parent 86b1b64b
No related branches found
No related tags found
1 merge request!2325Perform password validation in UpdateUser
This commit is part of merge request !2325. Comments created here will be created in the context of that merge request.
......@@ -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={
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment