- my $Object = $self->SUPER::Next();
- if ( ( defined($Object) ) and ( ref($Object) ) ) {
-
- if ( $Object->CurrentUserHasRight('ShowArticle') ) {
- return ($Object);
- }
-
- #If the user doesn't have the right to show this Object
- else {
- return ( $self->Next() );
- }
- }
-
- #if there never was any queue
- else {
- return (undef);
- }
-
+ return unless $record->CurrentUserHasRight('ShowArticle');
+ return $self->SUPER::AddRecord( $record );