stable

Clone or download

Read-only

Add minimal filename patterner validation

Part of story #24166 apply a naming pattern on files to enforce a convention Note: This contribution concerns both UI How to test: - Insert in `plugin_docman_project_settings` an invalid filename pattern. e.g: tuleap#${VERSION_NAME} - Try to create or update a file => An error is displayed and the file is not created/updated Change-Id: Ia7b66bd4331c06302bb39b9b2dc9b1701fbca6ae

Modified Files

Name
M plugins/docman/include/Docman_Actions.class.php +24 −10 Go to diff View file
M plugins/docman/include/Docman_Controller.class.php +56 −5 Go to diff View file
M plugins/docman/include/FilenamePattern/FilenameBuilder.php +9 −2 Go to diff View file
A plugins/docman/include/FilenamePattern/FilenamePatternValidator.php +37 −0 Go to diff View file
A plugins/docman/include/FilenamePattern/InvalidMinimalPatternException.php +38 −0 Go to diff View file
M plugins/docman/include/REST/v1/DocmanFilesResource.php +2 −1 Go to diff View file
M plugins/docman/include/REST/v1/DocmanItemCreator.php +3 −4 Go to diff View file
M plugins/docman/include/REST/v1/Files/DocmanFileVersionCreator.php +2 −0 Go to diff View file
M plugins/docman/site-content/fr_FR/LC_MESSAGES/tuleap-docman.po +13 −0 Go to diff View file
M plugins/docman/tests/unit/DocmanActionsTest.php +13 −12 Go to diff View file
M plugins/docman/tests/unit/Docman_SOAPActionsTest.php +2 −1 Go to diff View file
M plugins/docman/tests/unit/FilenamePattern/FilenameBuilderTest.php +10 −30 Go to diff View file
A plugins/docman/tests/unit/FilenamePattern/FilenamePatternValidatorTest.php +47 −0 Go to diff View file