[Rt-commit] [svn] r1641 - in rt/branches/3.2-RELEASE: . lib/RT

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Sat Oct 9 11:02:15 EDT 2004


Author: jesse
Date: Sat Oct  9 11:02:14 2004
New Revision: 1641

Modified:
   rt/branches/3.2-RELEASE/   (props changed)
   rt/branches/3.2-RELEASE/lib/RT/Ticket_Overlay.pm
Log:
 r1976 at tinbook:  jesse | 2004-10-09T15:02:47.352944Z
 RT-Ticket: 6160
 RT-Status: resolved
 RT-Update: correspond
 
 Refactored how we add links on ticket creation so that "ModifyTicket" rights
 aren't checked on ticket creation.
 


Modified: rt/branches/3.2-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.2-RELEASE/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/3.2-RELEASE/lib/RT/Ticket_Overlay.pm	Sat Oct  9 11:02:14 2004
@@ -673,7 +673,7 @@
         foreach my $link (
             ref( $args{$type} ) ? @{ $args{$type} } : ( $args{$type} ) )
         {
-            my ( $wval, $wmsg ) = $self->AddLink(
+            my ( $wval, $wmsg ) = $self->_AddLink(
                 Type                          => $LINKTYPEMAP{$type}->{'Type'},
                 $LINKTYPEMAP{$type}->{'Mode'} => $link,
                 Silent                        => 1
@@ -2663,6 +2663,24 @@
         return ( 0, $self->loc("Permission Denied") );
     }
 
+
+    $self->_AddLink(%args);
+}
+
+=head2 _AddLink  
+
+Private non-acled variant of AddLink so that links can be added during create.
+
+=cut
+
+sub _AddLink {
+    my $self = shift;
+    my %args = ( Target => '',
+                 Base   => '',
+                 Type   => '',
+                 Silent => undef,
+                 @_ );
+
     my ($val, $Msg) = $self->SUPER::_AddLink(%args);
 
     if (!$val) {


More information about the Rt-commit mailing list