Commit 8ec3f6fc authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 385209: Part 2: Only consider */NA and */MANDATORY when the bug is being…

Bug 385209: Part 2: Only consider */NA and */MANDATORY when the bug is being moved to another product - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
parent f8f988fb
...@@ -1358,21 +1358,23 @@ foreach my $id (@idlist) { ...@@ -1358,21 +1358,23 @@ foreach my $id (@idlist) {
# Leave inactive groups alone. # Leave inactive groups alone.
next unless $group->{group}->is_active; 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 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; $updated_groups{$gid} = $group->{group}->name;
} }
elsif ($group->{membercontrol} == CONTROLMAPNA 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}; delete $updated_groups{$gid};
} }
# When editing several bugs at once, only consider groups which # When editing several bugs at once, only consider groups which
# have been displayed. # 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) elsif (($user->in_group_id($gid) || $product_change)
&& (defined $cgi->param('id') || defined $cgi->param("bit-$gid"))) && (defined $cgi->param('id') || defined $cgi->param("bit-$gid")))
{ {
......
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