diff options
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Attachment.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index b299d6503..3582ffb23 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -577,6 +577,9 @@ sub get_attachments_by_bug { my $flags = Bugzilla::Flag->match({ bug_id => $bug_id, target_type => 'attachment' }); + # Exclude flags for private attachments you cannot see. + @$flags = grep {exists $att{$_->attach_id}} @$flags; + push(@{$att{$_->attach_id}->{flags}}, $_) foreach @$flags; $attachments = [sort {$a->id <=> $b->id} values %att]; } |