stable

Clone or download

Read-only

Update the POST /docman_items route to accept embedded documents

This is a part of story #12449 Modal new document for embbeded How to test: - Make sure to have $embeded_are_allowed = true in your docman.inc in the tuleap web container. ( in /etc/tuleap/plugins/docman/etc/ ) - Make sure to have a good docman root folder ( see docman.inc ) - Go to the API Explorer - Try to create an embedded file with content => It should return 201 with a CreatedItemRepresentation. => You can check in the new docman UI if the file has been added => When the file is added, it is stored in the $docman_root path ( By default it is = /var/lib/tuleap/docman/<your project>/) - Open the docman.inc in /etc/tuleap/plugins/docman/etc/ and set $embeded_are_allowed = false - Go to the API Explorer - Try to create an embedded file with content => It should returns 403 Change-Id: I60a0976e9ec8be45e94b0799c036c22e1a6aa026

Modified Files

Name
M plugins/docman/include/Docman_Actions.class.php +1 −0 Go to diff View file
M plugins/docman/include/REST/v1/AfterItemCreationVisitor.php +42 −2 Go to diff View file
M plugins/docman/include/REST/v1/DocmanItemCreator.php +77 −3 Go to diff View file
M plugins/docman/include/REST/v1/DocmanItemPOSTRepresentation.php +5 −1 Go to diff View file
M plugins/docman/include/REST/v1/DocmanItemsResource.php +35 −20 Go to diff View file
A plugins/docman/include/REST/v1/EmbeddedPropertiesPOSTRepresentation.php +30 −0 Go to diff View file
M plugins/docman/include/constants.php +18 −0 Go to diff View file
M plugins/docman/phpunit/REST/v1/DocmanItemCreatorTest.php +219 −11 Go to diff View file
M plugins/docman/tests/rest/Docman/DocmanItemsTest.php +50 −0 Go to diff View file