stable
Clone or download
Read-only
Part of story #11196 - delete artifacts with REST api How to test: - make post-chekout - In site-admin, set up a limit of 1 - Go in a tracker, create 3 artifacts and note their ids - In api explorer, go to > artifacts > DELETE artifacts/:id - Fill in the "id" field with one of the previous artifacts ids --> The target artifact has been deleted successfully - Enter the second artifact id, then submit again --> An error 429 is raised because you have excedeed the limit defined by the site administrator - Log out and reconnect with another user - Refresh the api explorer page - Enter the third artifact id and submit --> The target artifact has been deleted successfully Change-Id: I867495ce52fbb3ea6ed046390d70edadeea29592
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/tracker/db/install.sql | +8 | −0 | Go to diff View file |
A | plugins/tracker/db/mysql/updates/2018/201804091400_add_plugin_tracker_artifacts_deleted_table.php | +56 | −0 | Go to diff View file |
M | plugins/tracker/db/uninstall.sql | +1 | −0 | Go to diff View file |
M | plugins/tracker/include/REST/v1/ArtifactsResource.class.php | +63 | −2 | Go to diff View file |
A | plugins/tracker/include/Tracker/Artifact/ArtifactsDeletion/ArtifactsDeletionDAO.php | +56 | −0 | Go to diff View file |
A | plugins/tracker/include/Tracker/Artifact/ArtifactsDeletion/ArtifactsDeletionLimitReachedException.php | +37 | −0 | Go to diff View file |
A | plugins/tracker/include/Tracker/Artifact/ArtifactsDeletion/ArtifactsDeletionManager.php | +76 | −0 | Go to diff View file |
M | plugins/tracker/include/autoload.php | +5 | −2 | Go to diff View file |
A | plugins/tracker/tests/rest/ArtifactsDeletion/ArtifactsDeletionTest.php | +73 | −0 | Go to diff View file |
A | plugins/tracker/tests/rest/_fixtures/ArtifactsDeletion/project.xml | +84 | −0 | Go to diff View file |
A | plugins/tracker/tests/rest/_fixtures/ArtifactsDeletion/user_map.csv | +2 | −0 | Go to diff View file |
A | plugins/tracker/tests/rest/_fixtures/ArtifactsDeletion/users.xml | +33 | −0 | Go to diff View file |
A | plugins/tracker/tests/rest/init_test_data.php | +31 | −0 | Go to diff View file |
M | src/common/REST/Header.class.php | +9 | −0 | Go to diff View file |
M | tests/rest/tests/ArtifactsTest.php | +1 | −1 | Go to diff View file |