[Rt-commit] rt branch, 3.8/transactionbatch-permissions, created. rt-3.8.10-2-gd826a52

Kevin Falcone falcone at bestpractical.com
Fri Apr 22 13:13:51 EDT 2011


The branch, 3.8/transactionbatch-permissions has been created
        at  d826a52d5662731cb9a67a9bc7bd560bbdbd7f86 (commit)

- Log -----------------------------------------------------------------
commit d826a52d5662731cb9a67a9bc7bd560bbdbd7f86
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Fri Apr 22 13:11:46 2011 -0400

    Walk around acls when determining transaction type
    
    It is entirely possible that you'll have a ticket created by an
    Unprivileged user without ShowTicket.  This means that the Ticket Create
    transaction will have a CurrentUser of that Unprivileged user.
    $transaction->Type does not work if you don't have ShowTicket.
    This means that _FindScrips will go look for TransactionBatch Scrips
    with an ApplicableTransTypes of Any, not Create and you'll never have an
    On Create TransactionBatch scrip run.

diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 8dd88c9..dc789a0 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -3226,7 +3226,7 @@ sub _ApplyTransactionBatch {
     my $batch = $self->TransactionBatch;
 
     my %seen;
-    my $types = join ',', grep !$seen{$_}++, grep defined, map $_->Type, grep defined, @{$batch};
+    my $types = join ',', grep !$seen{$_}++, grep defined, map $_->__Value('Type'), grep defined, @{$batch};
 
     require RT::Scrips;
     RT::Scrips->new($RT::SystemUser)->Apply(

-----------------------------------------------------------------------


More information about the Rt-commit mailing list