stable

Clone or download

Read-only

Refacto: UGroups that can see a private comment must be in the comment object

This is part of story #19275 restrict who can see comments No functional changes. - Import XML with comments with private ugroups must save ugroups in plugin_tracker_private_comment_permission table - If you haven't rights to see a comment, in API Rest artifact/$id/changeset you should not see it Instead of getting ugroups that can see a private comment in PermissionChecker.php, now, they are injected in Comment object. This is needed for the next patch: to avoid making the same call to database to get these ugroups (once in permission checker, once in comment xml exporter). Change-Id: I19e1fe56a28d3aef0b5518f68d5920c38c3bc5ac

Modified Files

Name
M plugins/frs/include/FRS/REST/v1/ReleaseRepresentation.php +1 −2 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +1 −2 Go to diff View file
M plugins/tracker/include/REST/v1/ReportsResource.class.php +1 −2 Go to diff View file
M plugins/tracker/include/REST/v1/TrackersResource.class.php +1 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/PermissionChecker.php +8 −14 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/TrackerPrivateCommentUGroupPermissionRetriever.php +77 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/PostCreation/ActionsRunner.php +1 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset.class.php +15 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetFactory.class.php +21 −9 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetFactoryBuilder.class.php +6 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset_Comment.class.php +25 −10 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset_CommentNull.class.php +2 −1 Go to diff View file
M plugins/tracker/tests/unit/Artifact/Changeset/Comment/CommentPresenterTest.php +2 −1 Go to diff View file
M plugins/tracker/tests/unit/Artifact/Tracker_Artifact_XMLExportTest.php +8 −4 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/ArtifactRepresentationBuilderTest.php +2 −1 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/Changeset/ChangesetRepresentationBuilderTest.php +2 −1 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/Changeset/Comment/CommentRepresentationBuilderTest.php +2 −1 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/PrivateComment/PermissionCheckerTest.php +43 −31 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/PrivateComment/TrackerPrivateCommentUGroupPermissionRetrieverTest.php +129 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker_Artifact_Changeset_CommentTest.php +12 −6 Go to diff View file