stable

Clone or download

Read-only

Refactoring: isPrivateCommentForUser() is more understandable than userCanSeeComment()

This is part of story #19275 restrict who can see comments No functional changes. How to test: - Have a private comment |_ Have a ugroup id |_ Have a comment id (take from tracker_changeset_comment) |_ add (comment_id, ugroup_id) in plugin_tracker_private_comment_permission - Go to artifact UI with user that is not in the ugroup |=> You don't see the private comment - Use GET artifacts/$id/changeset with the same user |=> You see an empty comment Change-Id: I479f366a03b08fb5c5500a7639abb65abdbd3342

Modified Files

Name
M plugins/tracker/include/REST/Artifact/Changeset/ChangesetRepresentationBuilder.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/Comment/CommentPresenterBuilder.php +1 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/PermissionChecker.php +9 −9 Go to diff View file
M plugins/tracker/tests/unit/REST/Artifact/Changeset/ChangesetRepresentationBuilderTest.php +6 −6 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/CommentPresenterBuilderTest.php +4 −4 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/PrivateComment/PermissionCheckerTest.php +16 −16 Go to diff View file