From: Frédéric Buclin Date: Thu, 11 Mar 2010 23:39:16 +0000 (+0100) Subject: Bug 551210: Retargetted flags should be deleted if the flag setter has no privs to... X-Git-Tag: bugzilla-3.7.1~185 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f276a11f82d1670eea4014f4d87b289d4b7921ca;p=thirdparty%2Fbugzilla.git Bug 551210: Retargetted flags should be deleted if the flag setter has no privs to set the flag in the new product a=LpSolit --- diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index af07bfaa17..59308501a3 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -550,6 +550,8 @@ sub retarget { foreach my $flagtype (@flagtypes) { next if !$flagtype->is_active; next if (!$flagtype->is_multiplicable && scalar @{$flagtype->{flags}}); + next unless (($self->status eq '?' && $self->setter->can_request_flag($flagtype)) + || $self->setter->can_set_flag($flagtype)); $self->{type_id} = $flagtype->id; delete $self->{type};