- my $Attachment = $self->SUPER::Next;
- return $Attachment unless $Attachment;
-
- if ( $Attachment->TransactionObj->CurrentUserCanSee ) {
- return $Attachment;
- } else {
- # If the user doesn't have the right to show this ticket
- return $self->Next;
- }
-}
-
-
-=head2 NewItem
-
-Returns an empty new RT::Attachment item
-
-=cut
-
-sub NewItem {
- my $self = shift;
- return(RT::Attachment->new($self->CurrentUser));
+ return unless $record->TransactionObj->CurrentUserCanSee;
+ return $self->SUPER::AddRecord( $record );