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

ruz at bestpractical.com ruz at bestpractical.com
Fri Nov 16 17:42:23 EST 2007


Author: ruz
Date: Fri Nov 16 17:42:23 2007
New Revision: 9693

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

Log:
* unshift more global objects instead of pushing them,
  so we'll get them earlier in an upcoming refactoring
* do all things related to EquivObjects in HasRight and
  leave only checks in _HasRight

Modified: rt/branches/3.6-RELEASE/lib/RT/Principal_Overlay.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Principal_Overlay.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Principal_Overlay.pm	Fri Nov 16 17:42:23 2007
@@ -331,11 +331,13 @@
         # this is a little bit hacky, but basically, now that we've done
         # the ticket roles magic, we load the queue object
         # and ask all the rest of our questions about the queue.
-        push( @{ $args{'EquivObjects'} }, $args{'Object'}->QueueObj );
+        unshift @{ $args{'EquivObjects'} }, $args{'Object'}->QueueObj;
 
     }
 
-    # {{{ If we've cached a win or loss for this lookup say so
+    unshift @{ $args{'EquivObjects'} }, $RT::System
+        unless $self->can('_IsOverrideGlobalACL')
+               && $self->_IsOverrideGlobalACL( $args{'Object'} );
 
     # {{{ Construct a hashkey to cache decisions in
     my $hashkey = do {
@@ -396,10 +398,6 @@
 
     # If an object is defined, we want to look at rights for that object
 
-    push( @objects, 'RT::System' )
-      unless $self->can('_IsOverrideGlobalACL')
-             && $self->_IsOverrideGlobalACL( $args{Object} );
-
     my ($check_roles, $check_objects) = ('','');
     if( @objects ) {
         my @role_clauses;


More information about the Rt-commit mailing list