]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 385209: Part 2: Only consider */NA and */MANDATORY when the bug is being moved...
authorlpsolit%gmail.com <>
Wed, 4 Jul 2007 03:27:13 +0000 (03:27 +0000)
committerlpsolit%gmail.com <>
Wed, 4 Jul 2007 03:27:13 +0000 (03:27 +0000)
process_bug.cgi

index f2a174dee345611b8bdf1144e342b03d6a91d03f..4b5d0ec5436cec38673dceffa07a28b137eddda6 100755 (executable)
@@ -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")))
         {