Commit 05efc5cc authored by Dave Lawrence's avatar Dave Lawrence

Bug 952284 - Tags set to private comments should not be disclosed to everybody…

Bug 952284 - Tags set to private comments should not be disclosed to everybody in the bug activity table r=LpSolit,a=sgreen
parent 0ac53ed9
...@@ -3872,6 +3872,15 @@ sub get_activity { ...@@ -3872,6 +3872,15 @@ sub get_activity {
&& $include_comment_tags && $include_comment_tags
&& !$attach_id) && !$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 .= " $query .= "
UNION ALL UNION ALL
SELECT 'comment_tag' AS name, SELECT 'comment_tag' AS name,
...@@ -3883,8 +3892,10 @@ sub get_activity { ...@@ -3883,8 +3892,10 @@ sub get_activity {
longdescs_tags_activity.comment_id as comment_id longdescs_tags_activity.comment_id as comment_id
FROM longdescs_tags_activity FROM longdescs_tags_activity
INNER JOIN profiles ON profiles.userid = longdescs_tags_activity.who INNER JOIN profiles ON profiles.userid = longdescs_tags_activity.who
$suppjoins
WHERE longdescs_tags_activity.bug_id = ? WHERE longdescs_tags_activity.bug_id = ?
$datepart $datepart
$suppwhere
"; ";
push @args, $self->id; push @args, $self->id;
push @args, $starttime if defined $starttime; push @args, $starttime if defined $starttime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment