X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FTransactions.pm;h=9c359c07f294f2fbc4293ffc3cf8ccf6671309e2;hb=7f468802ce21215e6cfbcc188969f9000e2c7f4a;hp=3c9dac4d7963df2f1bb53ef20e3299a7c645b5ed;hpb=679854b8bbc65d112071111bbd7f34a6a481fb30;p=freeside.git diff --git a/rt/lib/RT/Transactions.pm b/rt/lib/RT/Transactions.pm index 3c9dac4d7..9c359c07f 100755 --- a/rt/lib/RT/Transactions.pm +++ b/rt/lib/RT/Transactions.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -132,27 +132,12 @@ sub LimitToTicket { } -sub Next { +sub AddRecord { my $self = shift; - - my $Transaction = $self->SUPER::Next(); - if ((defined($Transaction)) and (ref($Transaction))) { - # If the user can see the transaction's type, then they can - # see the transaction and we should hand it back. - if ($Transaction->Type) { - return($Transaction); - } - - #If the user doesn't have the right to show this ticket - else { - return($self->Next()); - } - } + my ($record) = @_; - #if there never was any ticket - else { - return(undef); - } + return unless $record->CurrentUserCanSee; + return $self->SUPER::AddRecord($record); }