]> 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:41:54 +0000 (00:41 +0100)
committerFrédéric Buclin <LpSolit@gmail.com>
Thu, 11 Mar 2010 23:41:54 +0000 (00:41 +0100)
a=LpSolit

Bugzilla/Flag.pm

index 44045a743604307c240fc9d33a93bd20d0e4da25..9f900269ef49c431a50f726b95aadbb152e058ce 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};