Commit 3ce4a388 authored by terry%mozilla.org's avatar terry%mozilla.org

Don't send email notification of bug changes to people who aren't allowed to see that bug.

parent ee401d62
...@@ -150,7 +150,7 @@ sub GetBugText { ...@@ -150,7 +150,7 @@ sub GetBugText {
"bug_status", "resolution", "priority", "bug_severity", "bug_status", "resolution", "priority", "bug_severity",
"area", "assigned_to", "reporter", "bug_file_loc", "area", "assigned_to", "reporter", "bug_file_loc",
"short_desc", "component", "qa_contact", "target_milestone", "short_desc", "component", "qa_contact", "target_milestone",
"status_whiteboard"); "status_whiteboard", "groupset");
my $query = "select " . join(", ", @collist) . my $query = "select " . join(", ", @collist) .
" from bugs where bug_id = $id"; " from bugs where bug_id = $id";
...@@ -224,9 +224,12 @@ sub fixaddresses { ...@@ -224,9 +224,12 @@ sub fixaddresses {
if ($i eq "") { if ($i eq "") {
next; next;
} }
SendSQL("select emailnotification from profiles where login_name = " . SendSQL("select emailnotification, groupset & $::bug{'groupset'} from profiles where login_name = " .
SqlQuote($i)); SqlQuote($i));
my $emailnotification = FetchOneColumn(); my ($emailnotification, $groupset) = (FetchSQLData());
if ($groupset ne $::bug{'groupset'}) {
next;
}
if ($emailnotification eq "CConly") { if ($emailnotification eq "CConly") {
if ($field ne "cc") { if ($field ne "cc") {
next; next;
......
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