[Rt-commit] r5232 - in rt/branches/3.5-TESTING: lib/RT

trs at bestpractical.com trs at bestpractical.com
Mon May 15 23:10:13 EDT 2006


Author: trs
Date: Mon May 15 23:10:13 2006
New Revision: 5232

Modified:
   rt/branches/3.5-TESTING/   (props changed)
   rt/branches/3.5-TESTING/lib/RT/Ticket_Overlay.pm

Log:
 r12307 at zot:  tom | 2006-05-15 23:09:54 -0400
 * When adding watchers and checking a user-supplied email address against the current user's, we want to canonicalize it and then compare case-insensitively.
 
 * Typo fix


Modified: rt/branches/3.5-TESTING/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.5-TESTING/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/3.5-TESTING/lib/RT/Ticket_Overlay.pm	Mon May 15 23:10:13 2006
@@ -1319,7 +1319,9 @@
     # {{{ Check ACLS
     #If the watcher we're trying to add is for the current user
     if ( $self->CurrentUser->PrincipalId  eq $args{'PrincipalId'}
-       or $self->CurrentUser->UserObj->EmailAddress eq $args{'Email'}) {
+       or    lc( $self->CurrentUser->UserObj->EmailAddress )
+          eq lc( RT::User::CanonicalizeEmailAddress(undef, $args{'Email'}) ))
+    {
         #  If it's an AdminCc and they don't have 
         #   'WatchAsAdminCc' or 'ModifyTicket', bail
         if ( $args{'Type'} eq 'AdminCc' ) {
@@ -3674,7 +3676,7 @@
 
 =head2 TransactionCustomFields
 
-    Returns the custom fields that transactions on tickets will ahve.
+    Returns the custom fields that transactions on tickets will have.
 
 =cut
 


More information about the Rt-commit mailing list