stable

Clone or download

Read-only

request #22597 Add to top backlog does not work when it's done by workflow post action

Introduced by I8ca6f3aa4165269efb0bf22c4f62f1c2953b021e How to reproduce: Have a program configure workflow to add element to top backlog when artifact has a specific status (example, feature is add to top backlog when its status is To plan) Switch artifact status, error will be thrown Why: We no longer use PFUser object everywhere instead, we use a UserIdentifier We use a dedicated user for workflow (AddToBacklogPostActionAllPowerfulUser) this user is by default a SuperUser Instead of checking all permissions for prioritization, the user can now carry the fact that he is ProgramAdmin, we'll check permissions only for non admin users Change-Id: I497ffde2ae67e9f16ca9c03bb427a9a4d3663c95

Modified Files

Name
M plugins/program_management/include/Adapter/Program/Backlog/AsynchronousCreation/PendingIterationCreationDAO.php +1 −1 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/ProgramIncrement/Content/FeatureAdditionProcessor.php +12 −11 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/ProgramIncrement/Content/FeatureRemovalProcessor.php +11 −11 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/TopBacklog/ArtifactTopBacklogActionBuilder.php +9 −3 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/TopBacklog/MassChangeTopBacklogActionBuilder.php +9 −2 Go to diff View file
M plugins/program_management/include/Adapter/Program/Backlog/TopBacklog/ProcessTopBacklogChange.php +9 −2 Go to diff View file
M plugins/program_management/include/Adapter/Program/Feature/FeatureRepresentationBuilder.php +5 −2 Go to diff View file
M plugins/program_management/include/Adapter/Program/Feature/Links/UserStoryLinkedToFeatureChecker.php +14 −15 Go to diff View file
M plugins/program_management/include/Adapter/Program/Feature/VerifyIsVisibleFeatureAdapter.php +8 −6 Go to diff View file
M plugins/program_management/include/Adapter/Workspace/UserManagerAdapter.php +1 −1 Go to diff View file
A plugins/program_management/include/Adapter/Workspace/UserPermissionsProxy.php +60 −0 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/Feature/Content/Links/VerifyLinkedUserStoryIsNotPlanned.php +2 −1 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/Feature/FeatureIdentifier.php +4 −6 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/Feature/VerifyIsVisibleFeature.php +2 −1 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/Content/ContentModifier.php +9 −2 Go to diff View file
M plugins/program_management/include/Domain/Program/Backlog/ProgramIncrement/Content/FeatureRemoval.php +2 −1 Go to diff View file
M plugins/program_management/include/Domain/Program/Plan/PrioritizeFeaturesPermissionVerifier.php +6 −5 Go to diff View file
M plugins/program_management/include/Domain/Program/Plan/VerifyPrioritizeFeaturesPermission.php +2 −1 Go to diff View file
M plugins/program_management/include/Domain/UserCanPrioritize.php +17 −26 Go to diff View file
M plugins/program_management/include/Domain/Workspace/UserIdentifier.php +9 −2 Go to diff View file
A plugins/program_management/include/Domain/Workspace/UserPermissions.php +31 −0 Go to diff View file
M plugins/program_management/include/REST/v1/ProgramIncrementResource.php +17 −8 Go to diff View file
M plugins/program_management/include/REST/v1/ProjectResource.php +7 −4 Go to diff View file
M plugins/program_management/include/program_managementPlugin.php +10 −6 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Events/ArtifactUpdatedProxyTest.php +1 −1 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/ProgramIncrement/Content/FeatureAdditionProcessorTest.php +48 −10 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/ProgramIncrement/Content/FeatureRemovalProcessorTest.php +10 −11 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/TopBacklog/ArtifactTopBacklogActionBuilderTest.php +14 −12 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/TopBacklog/MassChangeTopBacklogActionBuilderTest.php +12 −5 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Backlog/TopBacklog/ProcessTopBacklogChangeTest.php +45 −43 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Feature/Content/ProgramIncrementContentRetrieverTest.php +11 −10 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Feature/FeatureElementsRetrieverTest.php +11 −15 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Feature/FeatureRepresentationBuilderTest.php +18 −20 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Feature/Links/UserStoryLinkedToFeatureCheckerTest.php +43 −11 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Feature/VerifyIsVisibleFeatureAdapterTest.php +17 −16 Go to diff View file
M plugins/program_management/tests/unit/Adapter/Program/Plan/PrioritizeFeaturesPermissionVerifierTest.php +37 −6 Go to diff View file
A plugins/program_management/tests/unit/Adapter/Workspace/UserPermissionsProxyTest.php +78 −0 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/AsynchronousCreation/NewPendingIterationCreationTest.php +2 −2 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/Feature/FeatureIdentifierTest.php +6 −6 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Content/ContentModifierTest.php +21 −7 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Content/FeatureAdditionTest.php +9 −6 Go to diff View file
M plugins/program_management/tests/unit/Domain/Program/Backlog/ProgramIncrement/Content/FeatureRemovalTest.php +9 −8 Go to diff View file
A plugins/program_management/tests/unit/Stub/UserPermissionsStub.php +64 −0 Go to diff View file
M plugins/program_management/tests/unit/Stub/VerifyIsVisibleFeatureStub.php +3 −3 Go to diff View file
M plugins/program_management/tests/unit/Stub/VerifyLinkedUserStoryIsNotPlannedStub.php +3 −3 Go to diff View file
M plugins/program_management/tests/unit/Stub/VerifyPrioritizeFeaturesPermissionStub.php +2 −1 Go to diff View file