directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r291874 - /directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/
Date Tue, 27 Sep 2005 09:33:40 GMT
Author: trustin
Date: Tue Sep 27 02:33:33 2005
New Revision: 291874

URL: http://svn.apache.org/viewcvs?rev=291874&view=rev
Log:
Modified ACITupleFilter implementations to skip tuples whose size is too small or zero.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/HighestPrecedenceFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxImmSubFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxValueCountFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MicroOperationFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedProtectedItemFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedUserClassFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/HighestPrecedenceFilter.java?rev=291874&r1=291873&r2=291874&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/HighestPrecedenceFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/HighestPrecedenceFilter.java
Tue Sep 27 02:33:33 2005
@@ -33,6 +33,11 @@
 {
     public Collection filter( Collection tuples, OperationScope scope, NextInterceptor next,
Name userGroupName, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations
) throws NamingException
     {
+        if( tuples.size() <= 1 )
+        {
+            return tuples;
+        }
+
         int maxPrecedence = -1;
         
         // Find the maximum precedence for all tuples.

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxImmSubFilter.java?rev=291874&r1=291873&r2=291874&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxImmSubFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxImmSubFilter.java
Tue Sep 27 02:33:33 2005
@@ -54,6 +54,11 @@
             return tuples;
         }
         
+        if( tuples.size() == 0 )
+        {
+            return tuples;
+        }
+        
         if( scope != OperationScope.ENTRY )
         {
             return tuples;

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxValueCountFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxValueCountFilter.java?rev=291874&r1=291873&r2=291874&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxValueCountFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MaxValueCountFilter.java
Tue Sep 27 02:33:33 2005
@@ -40,6 +40,11 @@
         {
             return tuples;
         }
+        
+        if( tuples.size() == 0 )
+        {
+            return tuples;
+        }
 
         for( Iterator i = tuples.iterator(); i.hasNext(); )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MicroOperationFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MicroOperationFilter.java?rev=291874&r1=291873&r2=291874&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MicroOperationFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/MicroOperationFilter.java
Tue Sep 27 02:33:33 2005
@@ -34,6 +34,11 @@
 {
     public Collection filter( Collection tuples, OperationScope scope, NextInterceptor next,
Name userGroupName, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations
) throws NamingException
     {
+        if( tuples.size() == 0 )
+        {
+            return tuples;
+        }
+
         for( Iterator i = tuples.iterator(); i.hasNext(); )
         {
             ACITuple tuple = ( ACITuple ) i.next();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedProtectedItemFilter.java?rev=291874&r1=291873&r2=291874&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedProtectedItemFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedProtectedItemFilter.java
Tue Sep 27 02:33:33 2005
@@ -54,6 +54,11 @@
 
     public Collection filter( Collection tuples, OperationScope scope, NextInterceptor next,
Name userGroupName, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations
) throws NamingException
     {
+        if( tuples.size() == 0 )
+        {
+            return tuples;
+        }
+
         for( Iterator i = tuples.iterator(); i.hasNext(); )
         {
             ACITuple tuple = ( ACITuple ) i.next();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedUserClassFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedUserClassFilter.java?rev=291874&r1=291873&r2=291874&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedUserClassFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RelatedUserClassFilter.java
Tue Sep 27 02:33:33 2005
@@ -46,6 +46,11 @@
     
     public Collection filter( Collection tuples, OperationScope scope, NextInterceptor next,
Name userGroupName, Name userName, Attributes userEntry, AuthenticationLevel authenticationLevel,
Name entryName, String attrId, Object attrValue, Attributes entry, Collection microOperations
) throws NamingException
     {
+        if( tuples.size() == 0 )
+        {
+            return tuples;
+        }
+
         for( Iterator i = tuples.iterator(); i.hasNext(); )
         {
             ACITuple tuple = ( ACITuple ) i.next();

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java?rev=291874&r1=291873&r2=291874&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/ldap/server/authz/support/RestrictedByFilter.java
Tue Sep 27 02:33:33 2005
@@ -41,6 +41,11 @@
             return tuples;
         }
 
+        if( tuples.size() == 0 )
+        {
+            return tuples;
+        }
+        
         for( Iterator i = tuples.iterator(); i.hasNext(); )
         {
             ACITuple tuple = ( ACITuple ) i.next();



Mime
View raw message