stable

Clone or download

Read-only

Hide comments that user can't see

This is part of story #19275 restrict who can see comments How to test: - Have an artifact with its id - Create comment and get its id on tracker_changeset_comment table - Have 2 users that are not in same ugroup |_for example: a project admin, and a member - Get the id a ugroup |_ for example: project admins id => 4 - Add row in plugin_tracker_private_comment_permission with comment id and ugroup id - Go to artifact UI with these 2 members Expected results: - With project admin => You see the comment - With member => You have an empty comment Change-Id: Ib1d569fa1a19c5eb6502c9dec901b54cb622636b

Modified Files

Name
M plugins/frs/include/FRS/REST/v1/ReleaseRepresentation.php +2 −1 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +2 −1 Go to diff View file
M plugins/tracker/include/REST/v1/ReportsResource.class.php +2 −1 Go to diff View file
M plugins/tracker/include/REST/v1/TrackersResource.class.php +2 −1 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/Changeset/Comment/CommentPresenterBuilder.php +61 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/PermissionChecker.php +14 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/PostCreation/ActionsRunner.php +2 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset_Comment.class.php +8 −7 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/CommentPresenterBuilderTest.php +129 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/PrivateComment/PermissionCheckerTest.php +24 −2 Go to diff View file