stable

Clone or download

Read-only

feat(artifacts): Move artifacts is no more linked to artifact deletion

This is part of request #34032 Move of artifacts should not depend on artifact deletion The move action is no more regultaed using the artifact deletion limit (this was confusant for users). Instead, each tracker can define if move action is allowed or not (allowed by default). How to test ----------- * As site administrator define a deletion limit to 0 * As tracker administration, allow artifact move action * As regular user move an artifact => artifact move succeed * As tracker administration, disallow artifact move action * As regular user, try to move an artifact => artifact move must be forbidden Note: Some points like XML export/import of the option, the output in REST full tracker representation and tracker inheritance will be handled in a dedicated commit. Change-Id: I2ae9c8157c6afc7c1c340b15c57d7302004f0954

Modified Files

Name
M plugins/tracker/db/install.sql +4 −0 Go to diff View file
A plugins/tracker/db/mysql/updates/2024/202401161010_add_forbidden_move_action.php +42 −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 +7 −6 Go to diff View file
M plugins/tracker/include/REST/v1/Move/BeforeMoveChecker.php +13 −2 Go to diff View file
M plugins/tracker/include/REST/v1/Move/MovePatchAction.php +1 −20 Go to diff View file
M plugins/tracker/include/REST/v1/Move/MoveRestArtifact.php +1 −1 Go to diff View file
M plugins/tracker/include/REST/v1/Move/RestArtifactMover.php +4 −5 Go to diff View file
M plugins/tracker/include/Tracker/Action/MegaMoverArtifactByDuckTyping.php +3 −5 Go to diff View file
M plugins/tracker/include/Tracker/Action/MoveArtifactByDuckTyping.php +1 −1 Go to diff View file
A plugins/tracker/include/Tracker/Admin/MoveArtifacts/MoveActionAllowedChecker.php +48 −0 Go to diff View file
A plugins/tracker/include/Tracker/Admin/MoveArtifacts/MoveActionAllowedDAO.php +55 −0 Go to diff View file
A plugins/tracker/include/Tracker/Admin/MoveArtifacts/MoveActionForbiddenFault.php +45 −0 Go to diff View file
A plugins/tracker/include/Tracker/Admin/MoveArtifacts/MoveArtifactsAdminController.php +79 −0 Go to diff View file
R plugins/tracker/include/REST/v1/Move/HeaderForMoveSender.php Go to diff View file
A plugins/tracker/include/Tracker/Admin/MoveArtifacts/MoveArtifactsAdminUpdateController.php +80 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ActionButtons/ArtifactMoveButtonPresenterBuilder.php +16 −16 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Artifact.php +4 −10 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/ArtifactsDeletion/ArtifactsDeletionManager.php +1 −7 Go to diff View file
M plugins/tracker/include/trackerPlugin.php +23 −0 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +16 −0 Go to diff View file
M plugins/tracker/site-content/pt_BR/LC_MESSAGES/tuleap-tracker.po +16 −0 Go to diff View file
M plugins/tracker/templates/admin-header-bp.mustache +3 −0 Go to diff View file
M plugins/tracker/templates/admin-header.mustache +5 −0 Go to diff View file
A plugins/tracker/templates/admin/admin-move-artifacts.mustache +33 −0 Go to diff View file
M plugins/tracker/tests/rest/ArtifactsActions/ArtifactsActionsTest.php +0 −20 Go to diff View file
M plugins/tracker/tests/unit/Stub/MoveArtifactByDuckTypingStub.php +4 −6 Go to diff View file
M plugins/tracker/tests/unit/Stub/MoveRestArtifactStub.php +6 −8 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Action/MegaMoverArtifactByDuckTypingTest.php +3 −3 Go to diff View file
M plugins/tracker/tests/unit/Tracker/ActionButton/ArtifactMoveButtonPresenterBuilderTest.php +69 −88 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Admin/MoveArtifacts/MoveActionAllowedCheckerTest.php +63 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/REST/v1/Move/BeforeMoveCheckerTest.php +51 −17 Go to diff View file
M plugins/tracker/tests/unit/Tracker/REST/v1/Move/MovePatchActionTest.php +16 −103 Go to diff View file
M plugins/tracker/tests/unit/Tracker/REST/v1/Move/RestArtifactMoverTest.php +1 −1 Go to diff View file