stable

Clone or download

Read-only

[feature] Deal with project title/shortname/description errors

This is part of story #21386 dry run REST project creation The checks for shortname / title and description at project creation has been moved to the error collector object. If there is no permissions errors, then all other errors are collected and then provided at once by the dry_run POST route. This leads to a quite big refactoring of the project creation. No functional change expected in the project creation. Change-Id: I15a9e5ebf1bf2aaf516bca18a504f14d32c25611

Modified Files

Name
M site-content/fr_FR/LC_MESSAGES/tuleap-core.po +11 −0 Go to diff View file
M src/common/Project/ProjectCreationData.class.php +3 −2 Go to diff View file
M src/common/Project/ProjectCreator.class.php +16 −85 Go to diff View file
M src/common/Project/ProjectXMLImporter.class.php +1 −1 Go to diff View file
A src/common/Project/REST/v1/ProjectCreationDataPOSTProjectBuilder.php +135 −0 Go to diff View file
M src/common/Project/REST/v1/ProjectResource.class.php +39 −16 Go to diff View file
M src/common/Project/REST/v1/RestProjectCreator.php +40 −122 Go to diff View file
R src/common/Project/ProjectDescriptionMandatoryException.php Go to diff View file
R src/common/Project/Project_InvalidShortName_Exception.class.php Go to diff View file
A src/common/Project/Registration/ProjectInvalidShortNameException.php +47 −0 Go to diff View file
M src/common/Project/Registration/ProjectRegistrationChecker.php +45 −3 Go to diff View file
M src/common/Project/Registration/ProjectRegistrationErrorsCollection.php +3 −3 Go to diff View file
R src/common/Project/Project_InvalidFullName_Exception.class.php Go to diff View file
M src/common/Project/Registration/RegistrationForbiddenException.php +1 −2 Go to diff View file
M src/themes/BurningParrot/include/BurningParrotTheme.php +3 −1 Go to diff View file
M src/www/themes/FlamingParrot/FlamingParrot_Theme.class.php +3 −1 Go to diff View file
M tests/rest/tests/ProjectTest.php +38 −31 Go to diff View file
M tests/unit/common/Project/ProjectCreatorTest.php +96 −102 Go to diff View file
M tests/unit/common/Project/ProjectXMLImporterTest.php +0 −2 Go to diff View file
A tests/unit/common/Project/REST/v1/ProjectCreationDataPOSTProjectBuilderTest.php +215 −0 Go to diff View file
M tests/unit/common/Project/REST/v1/RestProjectCreatorTest.php +135 −110 Go to diff View file
A tests/unit/common/Project/Registration/ProjectRegistrationCheckerTest.php +242 −0 Go to diff View file