]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 551210: Retargetted flags should be deleted if the flag setter has no privs to...
authorFrédéric Buclin <LpSolit@gmail.com>
Thu, 11 Mar 2010 23:39:16 +0000 (00:39 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 11 Mar 2010 23:39:16 +0000 (00:39 +0100)
a=LpSolit

Bugzilla/Flag.pm

index af07bfaa17e9e810392206f461839f251990b2f8..59308501a326ed6abd6ad5215a1f883f29162e1b 100644 (file)
@@ -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};