[rt-commit] [svn] r494 - in rt/branches/rt-3.1:
html/Ticket/Elements lib/RT lib/RT/Action
jesse at fsck.com
jesse at fsck.com
Sun Mar 7 22:12:38 EST 2004
Author: jesse
Date: Sun Mar 7 22:12:38 2004
New Revision: 494
Modified:
rt/branches/rt-3.1/html/Ticket/Elements/FindAttachments
rt/branches/rt-3.1/html/Ticket/Elements/ShowTransaction
rt/branches/rt-3.1/lib/RT/Action/SendEmail.pm
rt/branches/rt-3.1/lib/RT/Attachment_Overlay.pm
rt/branches/rt-3.1/lib/RT/Ticket_Overlay.pm
Log:
ACL fixes for outgoing Comment email records.
Forward porting performance fixes from 3.0.10pre2
Modified: rt/branches/rt-3.1/html/Ticket/Elements/FindAttachments
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/Elements/FindAttachments (original)
+++ rt/branches/rt-3.1/html/Ticket/Elements/FindAttachments Sun Mar 7 22:12:38 2004
@@ -35,6 +35,10 @@
$attachments->Limit( ALIAS => $transactions,
FIELD => 'Type',
OPERATOR => '!=',
+ VALUE => "CommentEmailRecord" );
+ $attachments->Limit( ALIAS => $transactions,
+ FIELD => 'Type',
+ OPERATOR => '!=',
VALUE => "Comment" );
}
}
Modified: rt/branches/rt-3.1/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/Elements/ShowTransaction (original)
+++ rt/branches/rt-3.1/html/Ticket/Elements/ShowTransaction Sun Mar 7 22:12:38 2004
@@ -190,7 +190,7 @@
@DisplayHeaders = qw(To From RT-Send-Cc Cc Bcc Date Subject);
}
- if ( $Transaction->Attachments->First && $ShowTitleBarCommands ) {
+ if ( $Attachments->[0] && $ShowTitleBarCommands ) {
if ( $Transaction->TicketObj->CurrentUserHasRight('ReplyToTicket') ) {
$titlebar_commands .=
"[<a href=\"Update.html?id="
Modified: rt/branches/rt-3.1/lib/RT/Action/SendEmail.pm
==============================================================================
--- rt/branches/rt-3.1/lib/RT/Action/SendEmail.pm (original)
+++ rt/branches/rt-3.1/lib/RT/Action/SendEmail.pm Sun Mar 7 22:12:38 2004
@@ -108,16 +108,16 @@
# TODO: We should be pulling the recipients out of the template and shove them into To, Cc and Bcc
- $self->SetHeader( 'To', join ( ',', @{ $self->{'To'} } ) )
+ $self->SetHeader( 'To', join ( ', ', @{ $self->{'To'} } ) )
if ( ! $MIMEObj->head->get('To') && $self->{'To'} && @{ $self->{'To'} } );
- $self->SetHeader( 'Cc', join ( ',', @{ $self->{'Cc'} } ) )
+ $self->SetHeader( 'Cc', join ( ', ', @{ $self->{'Cc'} } ) )
if ( !$MIMEObj->head->get('Cc') && $self->{'Cc'} && @{ $self->{'Cc'} } );
- $self->SetHeader( 'Bcc', join ( ',', @{ $self->{'Bcc'} } ) )
+ $self->SetHeader( 'Bcc', join ( ', ', @{ $self->{'Bcc'} } ) )
if ( !$MIMEObj->head->get('Bcc') && $self->{'Bcc'} && @{ $self->{'Bcc'} } );
# PseudoTo (fake to headers) shouldn't get matched for message recipients.
# If we don't have any 'To' header, drop in the pseudo-to header.
- $self->SetHeader( 'To', join ( ',', @{ $self->{'PseudoTo'} } ) )
+ $self->SetHeader( 'To', join ( ', ', @{ $self->{'PseudoTo'} } ) )
if ( $self->{'PseudoTo'} && ( @{ $self->{'PseudoTo'} } )
and ( !$MIMEObj->head->get('To') ) );
Modified: rt/branches/rt-3.1/lib/RT/Attachment_Overlay.pm
==============================================================================
--- rt/branches/rt-3.1/lib/RT/Attachment_Overlay.pm (original)
+++ rt/branches/rt-3.1/lib/RT/Attachment_Overlay.pm Sun Mar 7 22:12:38 2004
@@ -532,29 +532,32 @@
=cut
-sub _Value {
+sub _Value {
- my $self = shift;
+ my $self = shift;
my $field = shift;
-
-
+
#if the field is public, return it.
- if ($self->_Accessible($field, 'public')) {
- return($self->__Value($field, @_));
+ if ( $self->_Accessible( $field, 'public' ) ) {
+ return ( $self->__Value( $field, @_ ) );
}
-
+
#If it's a comment, we need to be extra special careful
- elsif ( (($self->TransactionObj->CurrentUserHasRight('ShowTicketComments')) and
- ($self->TransactionObj->Type eq 'Comment') ) or
- ($self->TransactionObj->CurrentUserHasRight('ShowTicket'))) {
- return($self->__Value($field, @_));
+ elsif ( $self->TransactionObj->Type =~ /^Comment/ ) {
+ if ( $self->TransactionObj->CurrentUserHasRight('ShowTicketComments') )
+ {
+ return ( $self->__Value( $field, @_ ) );
+ }
+ }
+ elsif ( $self->TransactionObj->CurrentUserHasRight('ShowTicket') ) {
+ return ( $self->__Value( $field, @_ ) );
}
+
#if they ain't got rights to see, don't let em
else {
- return(undef);
- }
-
-
+ return (undef);
+ }
+
}
# }}}
Modified: rt/branches/rt-3.1/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/rt-3.1/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/rt-3.1/lib/RT/Ticket_Overlay.pm Sun Mar 7 22:12:38 2004
@@ -3890,12 +3890,14 @@
$transactions->Limit(
FIELD => 'Type',
OPERATOR => '!=',
- VALUE => "Comment"
+ VALUE => "Comment",
+ ENTRYAGGREGATOR => 'AND'
);
$transactions->Limit(
FIELD => 'Type',
OPERATOR => '!=',
- VALUE => "CommentEmailRecord"
+ VALUE => "CommentEmailRecord",
+ ENTRYAGGREGATOR => 'AND'
);
}
}
More information about the Rt-commit
mailing list