-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 display name ignored when creating new user #9242
Fix display name ignored when creating new user #9242
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9242 +/- ##
============================================
+ Coverage 51.04% 51.71% +0.66%
+ Complexity 26797 25672 -1125
============================================
Files 1708 1634 -74
Lines 99644 95815 -3829
Branches 1327 1382 +55
============================================
- Hits 50864 49551 -1313
+ Misses 48780 46264 -2516
|
That explains why I was confused because the displays me was not how I thought I typed it in😅 |
Since we're going to switch to the new users list, all of this is fixed already since we're now using our ocs api to create users. Old legacy code like this one is being cleaned :/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
4276ce7
to
994a67e
Compare
I have amended the last commit as I had forgotten to add the step to the matrix (and thus it was not executed by Drone). |
CI failure is unrelated. |
Did someone read my message above? 😁 ❤️ |
All of this is fixed already... but where? :-P I mean, in current master if you create a user with a custom display name that name is ignored, so I guess that it is fixed in some branch that will become a pull request in the future. Therefore, if these changes affect or conflict in any way with your work you can close this, but if they do not I would merge this now even if it is going to be thrown away in the future. |
@danxuliu aaand you're right, somehow I missed that! server/apps/provisioning_api/lib/Controller/UsersController.php Lines 205 to 211 in 3ff041f
|
My point (tell me what you think @danxuliu :) ) is: since we want to drop old legacy stuf (so the Userscontroller users management parts), maybe we should edit this pr to add the new method to the ocs api instead :) This way we can easily add this ti the vue settings pr as well ;) |
But then you would be using the OCS API to create new users while the rest of settings/js/users/users.js would be using the legacy AJAX calls. The new and the legacy parts can work together without problems, right? Personally I would merge the fix now and then add another pull request to move to the new API instead of fixing while moving, but it is just my usual nitpicking, so you have my blessing if you want to do it that way too ;-) |
@danxuliu could you add the input to the ocs api anyway? As a record, this will be override completely this week with the new migration ;) |
Sure ;-)
Rebase what onto what?
You do not need to subtly try to change my mind, I already told you that you can do it the other way if you want :-P |
994a67e
to
be6d916
Compare
Rebased on master. Basically the code was dropped but then we have at least the acceptance tests 😉 |
We still need to add this to the ocs api |
@skjnldsv Status of this? |
@MorrisJobke ocs api is still not included in this pr: @danxuliu server/apps/provisioning_api/lib/Controller/UsersController.php Lines 210 to 216 in 3ffeb4a
|
I will take care of that, although I want to fix some things in the acceptance tests before doing it (of course if that takes me longer than expected I will send these changes anyway before Beta |
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Although the form to create a new user included a field to set the display name its value was not taken into account, so the new user ended with the default display name (the same as the user name). Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
be6d916
to
029b33a
Compare
I will not be able to fix those things in the acceptance tests before Beta 2, so I have updated this pull request with the fix to the OCS API. This is now ready to be reviewed. |
Signed-off-by: Roeland Jago Douma <[email protected]>
I pushed the compiled vue stuff |
I had built (running just Anyway thanks for the fix ;-) |
@danxuliu no idea. Maybe the rebase messed things up? |
Follow-up to #7600
Before #7600 when a new user was created it was possible to set its user name, password and groups. In #7600 the display name and the e-mail were added to the form, but the display name was not taken into account when the new user was created (the e-mail, on the other hand, was).
This pull request adds an optional parameter to the create user endpoint to make possible to specify the display name and sends the display name set (if any) in the form when creating a user.
How to test
Expected result
The display name of the new user is set to the desired one.
Actual result
The display name of the new user is the default display name, which is the same as the user name.