Roots uploaded by bots don't get author specified properly
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Jul 2017 21:14:52 +0000 (21:14 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Jul 2017 21:14:52 +0000 (21:14 +0000)
commitc5abd81fed69bf80ec47d6b3c05aad1034059f28
tree73e6eca6f8522f9d879602bfe0d45470c3084602
parent49bf888e274b3c08bd4dd6eb3f1c5b163f2cf58f
Roots uploaded by bots don't get author specified properly
https://bugs.webkit.org/show_bug.cgi?id=174087

Reviewed by Andreas Kling.

When a root file is uploaded from the bot, we manually specify the remote user to upload_file_in_transaction.
However, this was getting ignored by create_uploaded_file_from_form_data since it was always calling
remote_user_name to get the user name off of $_SERVER.

Fixed the bug by passing in the user name from upload_file_in_transaction to create_uploaded_file_from_form_data.

* public/include/uploaded-file-helpers.php:
(create_uploaded_file_from_form_data): Take the remote user as an argument instead of calling remote_user_name.
(upload_file_in_transaction):
* server-tests/api-upload-root-tests.js: Updated an existing test cases to make sure root files' author is set.
(createTestGroupWihPatch): Manually override the author of a test group for testing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/include/uploaded-file-helpers.php
Websites/perf.webkit.org/server-tests/api-upload-root-tests.js