summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2014-01-07 06:02:49 +0100
committerDave Lawrence <dlawrence@mozilla.com>2014-01-07 06:02:49 +0100
commitae708fdf327467851f95a2a4b6e81cf352d318f9 (patch)
tree1cba4d0a88db336c47eed57d8dd97ed1d667de83 /Bugzilla/Bug.pm
parentdf7f46c1ff8a9bc903e040349024d5c0c2f5be94 (diff)
downloadbugzilla-ae708fdf327467851f95a2a4b6e81cf352d318f9.tar.gz
bugzilla-ae708fdf327467851f95a2a4b6e81cf352d318f9.tar.xz
Bug 956135 - backport upstream bug 952284 to bmo/4.2 to hide tags set to private comments in the bug activity table
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 51035ce5a..272526f12 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -3929,6 +3929,15 @@ sub GetBugActivity {
&& $include_comment_tags
&& !$attach_id)
{
+ # Only includes comment tag activity for comments the user is allowed to see.
+ $suppjoins = "";
+ $suppwhere = "";
+ if (!Bugzilla->user->is_insider) {
+ $suppjoins = "INNER JOIN longdescs
+ ON longdescs.comment_id = longdescs_tags_activity.comment_id";
+ $suppwhere = "AND longdescs.isprivate = 0";
+ }
+
$query .= "
UNION ALL
SELECT 'comment_tag' AS name,
@@ -3940,8 +3949,10 @@ sub GetBugActivity {
longdescs_tags_activity.comment_id as comment_id
FROM longdescs_tags_activity
INNER JOIN profiles ON profiles.userid = longdescs_tags_activity.who
+ $suppjoins
WHERE longdescs_tags_activity.bug_id = ?
$datepart
+ $suppwhere
";
push @args, $bug_id;
push @args, $starttime if defined $starttime;