stable

Clone or download

Read-only

request #11463: Misleading error message when trying to delete an artifact via REST

When the site admin set the limit in artifact deletion configuration to 0, it means that nobody can delete an artifact. In that case, when I try DELETE /artifacts/:id, I should get a 403 Forbidden instead of: "429 Too many requests" with error message "The limit of artifacts deletions has been reached for the previous 24 hours". When the user did not delete any artifacts in the previous 24 hours, this message is wrong. Change-Id: Ic00e37fffe241e9f52f146fe2a60d2e3902f6227

Modified Files

Name
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +4 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ArtifactsDeletion/ArtifactsDeletionManager.php +7 −1 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/ArtifactsDeletion/DeletionOfArtifactsIsNotAllowedException.php +33 −0 Go to diff View file
M plugins/tracker/include/autoload.php +3 −2 Go to diff View file