-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix direct password edit #1038
Fix direct password edit #1038
Conversation
by making the name of the password field flexible: * 'password' on the user creation form * 'value' on the edit password form
Codecov Report
@@ Coverage Diff @@
## hotfix #1038 +/- ##
===========================================
+ Coverage 66.66% 66.7% +0.03%
Complexity 1931 1931
===========================================
Files 162 162
Lines 6737 6745 +8
===========================================
+ Hits 4491 4499 +8
Misses 2246 2246
Continue to review full report at Codecov.
|
@rwos Have you tested to make sure this is compatible with updating existing users password? |
@amosfolz that's exactly the thing that this fixes. But I would appreciate someone other than me checking this again with v4.3.1 (setting a manual password on user creation works, updating a user's password is broken) and this PR (both work). I'm reasonably sure this works, but I was reasonably sure in #1030 too :-) |
My original comment said this only fixed CHANGING a password on 4.3.1 - this turned out to be my own fault, a sprinkle I had written had an old copy of the schema/requests/user/create.yaml file. When I got this updated (the offending difference was field: password vs field: value) everything password related, creating users with passwords or changing existing users passwords, works with this PR. Thanks!
|
The "single controller method accepting any field" thing could be phased out for password if this is too much of an issue. |
plus fix password field schema path for edit form
Alright - validation should be fixed now, and it now also uses the |
This is the one I tested - everything worked besides the validation message. If that is fixed, this should be merged and the other closed. |
Removed `value` as the default field name when editing a single field. The field name should now be the proper name. For example, editing `flag_enable`, the data should be `flag_enabled => 1` instead of `value => 1`
I've merged this, and with #1034, made other improvement in 29bfdd4. Should be good to go now. I change the behavior of For example, when updating Could introduce a minor Breaking change if someone uses that class in it's own sprinkle. Will add a note in the changelog. |
Bug: editing a users password does not work, it always ends up as invalid because "the passwords don't match".
This fixes that by making the name of the password field flexible:
UserController::updateField
)this replaces #1034
see also #1030
I now see that the whole thing could've also been fixed by calling the password field
"value"
(and reverting the above PR), but that looks a bit weird IMHO. But let me know what you think!