stable

Clone or download

Read-only

REST project creation enforce categories checks

The REST route should apply the same constraints than regular project creation regarding categories. Actually, as the code is shared with the project admin update of categories, the checks are more complete with the REST route than what is possible with regular project creation. For instance it's possible to create a project via REST with categories that are not mandatory or it's possible to use category values of more than 1 level of depth. Part of story #8283 Enhance project creation user experience Change-Id: Ia311acf24dd84d05daed1a61f5dc7ff30ebb20f3

Modified Files

Name
M site-content/fr_FR/LC_MESSAGES/tuleap-core.po +3 −0 Go to diff View file
A src/common/Project/Admin/Categories/InvalidValueForRootCategoryException.php +29 −0 Go to diff View file
M src/common/Project/Admin/Categories/MissingMandatoryCategoriesException.php +1 −1 Go to diff View file
A src/common/Project/Admin/Categories/NbMaxValuesException.php +29 −0 Go to diff View file
A src/common/Project/Admin/Categories/NotRootCategoryException.php +29 −0 Go to diff View file
A src/common/Project/Admin/Categories/ProjectCategoriesException.php +29 −0 Go to diff View file
M src/common/Project/Admin/Categories/ProjectCategoriesUpdater.php +70 −18 Go to diff View file
M src/common/Project/Admin/Categories/UpdateController.php +6 −3 Go to diff View file
M src/common/Project/REST/v1/RestProjectCreator.php +17 −20 Go to diff View file
M src/common/trove/TroveCat.php +2 −1 Go to diff View file
R src/common/trove/TrovecatDao.php Go to diff View file
M src/common/trove/TroveCatFactory.php +23 −1 Go to diff View file
M tests/phpunit/common/Project/Admin/Categories/ProjectCategoriesUpdaterTest.php +87 −12 Go to diff View file
M tests/phpunit/common/Project/REST/v1/RestProjectCreatorTest.php +35 −2 Go to diff View file