[Rt-commit] rt branch, 4.2/drop-limit-not-object-from-acl, created. rt-4.0.6-496-g7967751

Ruslan Zakirov ruz at bestpractical.com
Sun Aug 26 18:13:18 EDT 2012


The branch, 4.2/drop-limit-not-object-from-acl has been created
        at  7967751b70c132f481ba00f1f914f4a5262c3e10 (commit)

- Log -----------------------------------------------------------------
commit 7967751b70c132f481ba00f1f914f4a5262c3e10
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Mon Aug 27 01:46:58 2012 +0400

    drop ACL->LimitNotObject
    
    it's not used anywhere in the core
    
    it doesn't use (open|close)_parens, so calling it more
    than once would be hilarious
    
    it behaves differently from LimitToObject regarding
    objects without id
    
    If we will ever need something like this then we
    will add better version.

diff --git a/lib/RT/ACL.pm b/lib/RT/ACL.pm
index 34fa471..c1a0d42 100644
--- a/lib/RT/ACL.pm
+++ b/lib/RT/ACL.pm
@@ -122,40 +122,6 @@ sub LimitToObject {
 
 
 
-=head2 LimitNotObject $object
-
-Limit the ACL to rights NOT on the object $object.  $object needs to be
-an RT::Record class.
-
-=cut
-
-sub LimitNotObject {
-    my $self = shift;
-    my $obj  = shift;
-    unless ( defined($obj)
-        && ref($obj)
-        && UNIVERSAL::can( $obj, 'id' )
-        && $obj->id )
-    {
-        return undef;
-    }
-    $self->Limit( FIELD => 'ObjectType',
-		  OPERATOR => '!=',
-		  VALUE => ref($obj),
-		  ENTRYAGGREGATOR => 'OR',
-		  SUBCLAUSE => $obj->id
-		);
-    $self->Limit( FIELD => 'ObjectId',
-		  OPERATOR => '!=',
-		  VALUE => $obj->id,
-		  ENTRYAGGREGATOR => 'OR',
-		  QUOTEVALUE => 0,
-		  SUBCLAUSE => $obj->id
-		);
-}
-
-
-
 =head2 LimitToPrincipal { Type => undef, Id => undef, IncludeGroupMembership => undef }
 
 Limit the ACL to the principal with PrincipalId Id and PrincipalType Type

-----------------------------------------------------------------------


More information about the Rt-commit mailing list