From dff2223f37aa036d0cd403b5cfed7b9b9d4c510d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= Date: Fri, 12 Mar 2010 00:41:54 +0100 Subject: [PATCH] Bug 551210: Retargetted flags should be deleted if the flag setter has no privs to set the flag in the new product a=LpSolit --- Bugzilla/Flag.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index 44045a7436..9f900269ef 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}; -- 2.47.2