Bug 385209: Part 2: Only consider */NA and */MANDATORY when the bug is being moved to another product - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit

git-svn-id: svn://10.0.0.236/trunk@229284 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
lpsolit%gmail.com
2007-07-03 22:27:13 +00:00
parent e8da7b7a3f
commit 730eebe9d6

View File

@@ -1358,21 +1358,23 @@ foreach my $id (@idlist) {
# Leave inactive groups alone.
next unless $group->{group}->is_active;
# Only members of a group can add/remove the bug to/from it,
# unless the bug is being moved to another product in which case
# non-members can also edit group restrictions.
if ($group->{membercontrol} == CONTROLMAPMANDATORY
|| ($group->{othercontrol} == CONTROLMAPMANDATORY && !$user->in_group_id($gid)))
|| ($product_change && $group->{othercontrol} == CONTROLMAPMANDATORY
&& !$user->in_group_id($gid)))
{
$updated_groups{$gid} = $group->{group}->name;
}
elsif ($group->{membercontrol} == CONTROLMAPNA
|| ($group->{othercontrol} == CONTROLMAPNA && !$user->in_group_id($gid)))
|| ($product_change && $group->{othercontrol} == CONTROLMAPNA
&& !$user->in_group_id($gid)))
{
delete $updated_groups{$gid};
}
# When editing several bugs at once, only consider groups which
# have been displayed.
# Only members of a group can add/remove the bug to/from it,
# unless the bug is being moved to another product in which case
# non-members can also edit group restrictions.
elsif (($user->in_group_id($gid) || $product_change)
&& (defined $cgi->param('id') || defined $cgi->param("bit-$gid")))
{