[Rt-commit] r17029 - rt/3.8/trunk/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Wed Nov 26 19:24:35 EST 2008


Author: ruz
Date: Wed Nov 26 19:24:35 2008
New Revision: 17029

Modified:
   rt/3.8/trunk/lib/RT/ACL_Overlay.pm

Log:
* in ACL collection we fill a cache, don't call methods as methods may build
  some objects and check ACls what slowdowns cache building and may result in
  additional SQL queries. We need something internal so can skip ACL checks.

Modified: rt/3.8/trunk/lib/RT/ACL_Overlay.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/ACL_Overlay.pm	(original)
+++ rt/3.8/trunk/lib/RT/ACL_Overlay.pm	Wed Nov 26 19:24:35 2008
@@ -325,7 +325,8 @@
     my $self = shift;
 
     while (my $entry = $self->Next) {
-       my $hashkey = $entry->ObjectType . "-" .  $entry->ObjectId . "-" .  $entry->RightName . "-" .  $entry->PrincipalId . "-" .  $entry->PrincipalType;
+        my $hashkey = join '-', map $entry->__Value( $_ ),
+            qw(ObjectType ObjectId RightName PrincipalId PrincipalType);
 
         $self->{'as_hash'}->{"$hashkey"} =1;
 


More information about the Rt-commit mailing list