%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
<& /Elements/ListActions, actions => \@Actions &>
<& Elements/ShowUpdateStatus, Ticket => $TicketObj &>
-% $m->callback( %ARGS, Ticket => $TicketObj, CallbackName => 'BeforeShowSummary' );
+% $m->callback( %ARGS, Ticket => $TicketObj, Transactions => $transactions, Attachments => $attachments, CallbackName => 'BeforeShowSummary' );
<div class="summary">
<&| /Widgets/TitleBox, title => loc('Ticket metadata') &>
<& /Ticket/Elements/ShowSummary, Ticket => $TicketObj, Attachments => $attachments &>
</div>
<br />
-% $m->callback( Ticket => $TicketObj, %ARGS, CallbackName => 'BeforeShowHistory' );
+% $m->callback( Ticket => $TicketObj, %ARGS, Transactions => $transactions, Attachments => $attachments, CallbackName => 'BeforeShowHistory' );
% if (not $ForceShowHistory and RT->Config->Get( 'DeferTransactionLoading', $session{'CurrentUser'} )) {
<& /Ticket/Elements/ClickToShowHistory,
% $m->callback( %ARGS,
% Ticket => $TicketObj,
+% Transactions => $transactions,
+% Attachments => $attachments,
% CallbackName => 'AfterShowHistory',
% );
push @Actions, ProcessTicketReminders( ARGSRef => \%ARGS, TicketObj => $TicketObj );
- # XXX: we shouldn't block actions here if user has no right to see the ticket,
- # but we should allow him to see actions he has done
unless ($TicketObj->CurrentUserHasRight('ShowTicket')) {
- Abort("No permission to view ticket");
+ if (@Actions) {
+ Abort("A change was applied successfully, but you no longer have permissions to view the ticket", Actions => \@Actions);
+ } else {
+ Abort("No permission to view ticket");
+ }
}
if ( $ARGS{'MarkAsSeen'} ) {
$TicketObj->SetAttribute(