[Rt-commit] r5714 - rt/branches/3.6-RELEASE/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Mon Aug 7 23:08:22 EDT 2006


Author: ruz
Date: Mon Aug  7 23:08:21 2006
New Revision: 5714

Modified:
   rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm

Log:
* use $principal object we created before instead of args{PrincipalId}
  as user may provide email address
* use == instead of eq for id comparisions

Modified: rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Ticket_Overlay.pm	Mon Aug  7 23:08:21 2006
@@ -1513,7 +1513,7 @@
 
     # {{{ Check ACLS
     #If the watcher we're trying to add is for the current user
-    if ( $self->CurrentUser->PrincipalId eq $args{'PrincipalId'} ) {
+    if ( $self->CurrentUser->PrincipalId == $principal->id ) {
 
         #  If it's an AdminCc and they don't have
         #   'WatchAsAdminCc' or 'ModifyTicket', bail


More information about the Rt-commit mailing list