summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Transactions.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-08-07 22:01:31 -0700
committerIvan Kohler <ivan@freeside.biz>2015-08-07 22:01:31 -0700
commit0c76afbb717e1716e6126bc4a120b8d9471614a0 (patch)
tree9a398e455a7767372588077470685d25ef8d82b3 /rt/lib/RT/Transactions.pm
parent7beec7068e00be5ae1b2599fdf2b494bc19e31d0 (diff)
parent3e2c2ad8aff1bd361ca07495b2255538c8231079 (diff)
Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH
Diffstat (limited to 'rt/lib/RT/Transactions.pm')
-rwxr-xr-xrt/lib/RT/Transactions.pm25
1 files changed, 5 insertions, 20 deletions
diff --git a/rt/lib/RT/Transactions.pm b/rt/lib/RT/Transactions.pm
index 82bd50f12..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-2014 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (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);
}