summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2010-03-12 00:39:16 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2010-03-12 00:39:16 +0100
commitf276a11f82d1670eea4014f4d87b289d4b7921ca (patch)
tree69bcec1030670484c6bf3736fe93c6c8cd2d93f9 /Bugzilla/Flag.pm
parentb51abfd72a50401b02cbbdba4fd63568648d3cbf (diff)
downloadbugzilla-f276a11f82d1670eea4014f4d87b289d4b7921ca.tar.gz
bugzilla-f276a11f82d1670eea4014f4d87b289d4b7921ca.tar.xz
Bug 551210: Retargetted flags should be deleted if the flag setter has no privs to set the flag in the new product
a=LpSolit
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index af07bfaa1..59308501a 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};