stable

Clone or download

Read-only

A REST user can download a document manager file

Until now, only users of the web UI were able to download a file. With this contribution, users authenticated with a "pure REST" authentication method (e.g. an access key) can download the file from the download_href property of a docman item representation. The existing way in the Tuleap internals to propose a file to download has been replaced by an equivalent leveraging PSR-7 responses. Close request #13133: A REST API user can not download a document manager file Change-Id: Iec5de17f80d7bb51ebbcafa2df808fff50053634

Modified Files

Name
M plugins/docman/include/Docman_Version.class.php +41 −12 Go to diff View file
A plugins/docman/include/Download/DocmanFileDownloadCORS.php +53 −0 Go to diff View file
M plugins/docman/include/Download/DocmanFileDownloadController.php +17 −15 Go to diff View file
M plugins/docman/include/Download/DocmanFileDownloadResponseGenerator.php +14 −6 Go to diff View file
M plugins/docman/include/docmanPlugin.class.php +19 −2 Go to diff View file
A plugins/docman/phpunit/Download/DocmanFileDownloadCORSTest.php +63 −0 Go to diff View file
M plugins/docman/phpunit/Download/DocmanFileDownloadControllerTest.php +60 −14 Go to diff View file
M plugins/docman/phpunit/Download/DocmanFileDownloadResponseGeneratorTest.php +17 −7 Go to diff View file
M plugins/docman/tests/rest/Docman/DocmanItemsTestFilesTest.php +12 −5 Go to diff View file
M plugins/docman/tests/rest/Docman/DocmanItemsTestFoldersTest.php +13 −5 Go to diff View file
M plugins/forumml/www/upload.php +10 −5 Go to diff View file
M plugins/proftpd/include/ProFTPd/Explorer/ExplorerController.class.php +8 −4 Go to diff View file
M plugins/webdav/include/FS/WebDAVFRSFile.class.php +10 −6 Go to diff View file
D src/common/Http/BinaryFileResponse.php +0 −89 Go to diff View file
A src/common/Http/Response/BinaryFileResponseBuilder.php +81 −0 Go to diff View file
M src/common/frs/FRSFile.class.php +9 −3 Go to diff View file
M src/common/wiki/lib/WikiAttachmentRevision.class.php +22 −7 Go to diff View file
A tests/phpunit/common/Http/Response/BinaryFileResponseBuilderTest.php +58 −0 Go to diff View file