directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ersi...@apache.org
Subject svn commit: r583101 - in /directory/apacheds/branches/bigbang: core-unit/src/test/java/org/apache/directory/server/core/authz/ core/src/main/java/org/apache/directory/server/core/authz/ core/src/main/java/org/apache/directory/server/core/authz/support/...
Date Tue, 09 Oct 2007 10:37:48 GMT
Author: ersiner
Date: Tue Oct  9 03:37:45 2007
New Revision: 583101

URL: http://svn.apache.org/viewvc?rev=583101&view=rev
Log:
Fixed https://issues.apache.org/jira/browse/DIRSERVER-1062.
Fixed 1-2 more bugs while working on this one. It seems the implementation was done with misunderstood semantics.

Modified:
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MicroOperationFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
    directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java

Modified: directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java (original)
+++ directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/authz/ModifyAuthorizationITest.java Tue Oct  9 03:37:45 2007
@@ -546,9 +546,6 @@
     }
     
 
-    /**
-     * FIXME https://issues.apache.org/jira/browse/DIRSERVER-1062
-     * 
     public void testMaxValueCountProtectedItem() throws NamingException
     {
         createUser( "billyd", "billyd" );
@@ -570,12 +567,12 @@
                         " {" +
                             " protectedItems" + 
                             " {" +
+                                " attributeType { description }," +
+                                " allAttributeValues { description }," +
                                 " maxValueCount" + 
                                 " {" +
                                     " { type description, maxCount 1 }" + 
                                 " }" +
-                                " ," +
-                                " allAttributeValues { description }" + 
                             " }" +
                             " ," +
                             " grantsAndDenials" + 
@@ -601,6 +598,11 @@
         mods = toItems( DirContext.ADD_ATTRIBUTE, attrs );
         
         assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
+        
+        mods = toItems( DirContext.REPLACE_ATTRIBUTE, attrs );
+        
+        assertFalse( checkCanModifyAs( "billyd", "billyd", "ou=testou", mods ) );
     }
-    */
+    
+
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java Tue Oct  9 03:37:45 2007
@@ -48,6 +48,7 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
+import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -56,6 +57,7 @@
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.directory.*;
+
 import java.text.ParseException;
 import java.util.*;
 
@@ -424,7 +426,7 @@
         // check if entry scope permission is granted
         PartitionNexusProxy proxy = invocation.getProxy();
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
-            ADD_PERMS, tuples, subentryAttrs );
+            ADD_PERMS, tuples, subentryAttrs, null );
 
         // now we must check if attribute type and value scope permission is granted
         NamingEnumeration<? extends Attribute> attributeList = entry.getAll();
@@ -436,7 +438,7 @@
             for ( int ii = 0; ii < attr.size(); ii++ )
             {
                 engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, attr
-                    .getID(), attr.get( ii ), ADD_PERMS, tuples, entry );
+                    .getID(), attr.get( ii ), ADD_PERMS, tuples, entry, null );
             }
         }
 
@@ -484,7 +486,7 @@
         addSubentryAciTuples( proxy, tuples, name, entry );
 
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
-            REMOVE_PERMS, tuples, entry );
+            REMOVE_PERMS, tuples, entry, null );
 
         next.delete( deleteContext );
         tupleCache.subentryDeleted( name, entry );
@@ -533,10 +535,11 @@
         addSubentryAciTuples( proxy, tuples, name, entry );
 
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
-            Collections.singleton( MicroOperation.MODIFY ), tuples, entry );
+            Collections.singleton( MicroOperation.MODIFY ), tuples, entry, null );
 
         Collection<MicroOperation> perms = null;
-
+        Attributes entryView = ( Attributes ) entry.clone();
+        
         for ( ModificationItemImpl mod : mods )
         {
             Attribute attr = mod.getAttribute();
@@ -551,7 +554,7 @@
                     {
                         // ... we also need to check if adding the attribute is permitted
                         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
-                                attr.getID(), null, perms, tuples, entry );
+                                attr.getID(), null, perms, tuples, entry, null );
                     }
                     
                     break;
@@ -567,7 +570,7 @@
                         {
                             // ... we also need to check if removing the attribute at all is permitted
                             engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
-                                    attr.getID(), null, perms, tuples, entry );
+                                    attr.getID(), null, perms, tuples, entry, null );
                         }
                     }
                     
@@ -578,10 +581,25 @@
                     break;
             }
 
+            /**
+             * Update the entry view as the current modification is applied to the original entry.
+             * This is especially required for handling the MaxValueCount protected item. Number of
+             * values for an attribute after a modification should be known in advance in order to
+             * check permissions for MaxValueCount protected item. So during addition of the first
+             * value of an attribute it can be rejected if the permission denied due the the
+             * MaxValueCount protected item. This is not the perfect implementation as required by
+             * the specification because the system should reject the addition exactly on the right
+             * value of the attribute. However as we do not have that much granularity in our
+             * implementation (we consider an Attribute Addition itself a Micro Operation,
+             * not the individual Value Additions) we just handle this when the first value of an
+             * attribute is being checked for relevant permissions below. 
+             */
+            entryView = SchemaUtils.getTargetEntry( mod, entryView );
+            
             for ( int jj = 0; jj < attr.size(); jj++ )
-            {
+            {                
                 engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name,
-                        attr.getID(), attr.get( jj ), perms, tuples, entry );
+                        attr.getID(), attr.get( jj ), perms, tuples, entry, entryView );
             }
         }
 
@@ -619,7 +637,7 @@
 
         // check that we have browse access to the entry
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
-            BROWSE_PERMS, tuples, entry );
+            BROWSE_PERMS, tuples, entry, null );
 
         return next.hasEntry( entryContext );
     }
@@ -658,7 +676,7 @@
 
         // check that we have read access to the entry
         engine.checkPermission( proxy, userGroups, userName, principal.getAuthenticationLevel(), dn, null, null,
-            LOOKUP_PERMS, tuples, entry );
+            LOOKUP_PERMS, tuples, entry, null );
 
         // check that we have read access to every attribute type and value
         NamingEnumeration<? extends Attribute> attributeList = entry.getAll();
@@ -668,7 +686,7 @@
             for ( int ii = 0; ii < attr.size(); ii++ )
             {
                 engine.checkPermission( proxy, userGroups, userName, principal.getAuthenticationLevel(), dn, attr
-                    .getID(), attr.get( ii ), READ_PERMS, tuples, entry );
+                    .getID(), attr.get( ii ), READ_PERMS, tuples, entry, null );
             }
         }
     }
@@ -737,7 +755,7 @@
         addSubentryAciTuples( proxy, tuples, name, entry );
 
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
-            RENAME_PERMS, tuples, entry );
+            RENAME_PERMS, tuples, entry, null );
 
         next.rename( renameContext );
         tupleCache.subentryRenamed( name, newName );
@@ -784,7 +802,7 @@
         addSubentryAciTuples( proxy, tuples, oriChildName, entry );
 
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), oriChildName, null,
-            null, MOVERENAME_PERMS, tuples, entry );
+            null, MOVERENAME_PERMS, tuples, entry, null );
 
         // Get the entry again without operational attributes
         // because access control subentry operational attributes
@@ -814,7 +832,7 @@
         // Evaluate the target context to see whether it
         // allows an entry named newName to be imported as a subordinate.
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), newName, null,
-            null, IMPORT_PERMS, destTuples, subentryAttrs );
+            null, IMPORT_PERMS, destTuples, subentryAttrs, null );
 
 
         next.moveAndRename( moveAndRenameContext );
@@ -860,7 +878,7 @@
         addSubentryAciTuples( proxy, tuples, oriChildName, entry );
 
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), oriChildName, null,
-            null, EXPORT_PERMS, tuples, entry );
+            null, EXPORT_PERMS, tuples, entry, null );
         
         // Get the entry again without operational attributes
         // because access control subentry operational attributes
@@ -889,7 +907,7 @@
         // Evaluate the target context to see whether it
         // allows an entry named newName to be imported as a subordinate.
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), newName, null,
-            null, IMPORT_PERMS, destTuples, subentryAttrs );
+            null, IMPORT_PERMS, destTuples, subentryAttrs, null );
 
         next.move( moveContext );
         tupleCache.subentryRenamed( oriChildName, newName );
@@ -970,9 +988,9 @@
         addSubentryAciTuples( proxy, tuples, name, entry );
 
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, null, null,
-            READ_PERMS, tuples, entry );
+            READ_PERMS, tuples, entry, null );
         engine.checkPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), name, oid, value,
-            COMPARE_PERMS, tuples, entry );
+            COMPARE_PERMS, tuples, entry, null );
 
         return next.compare( opContext );
     }
@@ -1008,7 +1026,7 @@
             addSubentryAciTuples( proxy, tuples, matched, entry );
 
             if ( engine.hasPermission( proxy, userGroups, principalDn, principal.getAuthenticationLevel(), matched, null,
-                null, MATCHEDNAME_PERMS, tuples, entry ) )
+                null, MATCHEDNAME_PERMS, tuples, entry, null ) )
             {
                 return matched;
             }
@@ -1043,7 +1061,7 @@
         addSubentryAciTuples( invocation.getProxy(), tuples, normName, entry );
 
         if ( !engine.hasPermission( invocation.getProxy(), userGroups, userDn, ctx.getPrincipal()
-            .getAuthenticationLevel(), normName, null, null, SEARCH_ENTRY_PERMS, tuples, entry ) )
+            .getAuthenticationLevel(), normName, null, null, SEARCH_ENTRY_PERMS, tuples, entry, null ) )
         {
             return false;
         }
@@ -1064,7 +1082,7 @@
             Attribute attr = result.getAttributes().get( id );
         
             if ( !engine.hasPermission( invocation.getProxy(), userGroups, userDn, ctx.getPrincipal()
-                .getAuthenticationLevel(), normName, attr.getID(), null, SEARCH_ATTRVAL_PERMS, tuples, entry ) )
+                .getAuthenticationLevel(), normName, attr.getID(), null, SEARCH_ATTRVAL_PERMS, tuples, entry, null ) )
             {
                 result.getAttributes().remove( attr.getID() );
 
@@ -1080,7 +1098,7 @@
             {
                 if ( !engine.hasPermission( invocation.getProxy(), userGroups, userDn, ctx.getPrincipal()
                     .getAuthenticationLevel(), normName, attr.getID(), attr.get( ii ), SEARCH_ATTRVAL_PERMS, tuples,
-                    entry ) )
+                    entry, null ) )
                 {
                     attr.remove( ii );
 

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACDFEngine.java Tue Oct  9 03:37:45 2007
@@ -124,14 +124,15 @@
      *                  <tt>null</tt> if the user is not accessing a specific attribute value.
      * @param microOperations the {@link org.apache.directory.shared.ldap.aci.MicroOperation}s to perform
      * @param aciTuples {@link org.apache.directory.shared.ldap.aci.ACITuple}s translated from {@link org.apache.directory.shared.ldap.aci.ACIItem}s in the subtree entries
+     * @param entryView in case of a Modify operation, view of the entry being modified as if the modification permitted and completed
      * @throws NamingException if failed to evaluate ACI items
      */
     public void checkPermission( PartitionNexusProxy proxy, Collection<Name> userGroupNames, LdapDN username,
                                  AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
-                                 Collection<MicroOperation> microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
+                                 Collection<MicroOperation> microOperations, Collection<ACITuple> aciTuples, Attributes entry, Attributes entryView ) throws NamingException
     {
         if ( !hasPermission( proxy, userGroupNames, username, authenticationLevel, entryName, attrId, attrValue,
-            microOperations, aciTuples, entry ) )
+            microOperations, aciTuples, entry, entryView ) )
         {
             throw new LdapNoPermissionException();
         }
@@ -172,10 +173,11 @@
      *                  <tt>null</tt> if the user is not accessing a specific attribute value.
      * @param microOperations the {@link org.apache.directory.shared.ldap.aci.MicroOperation}s to perform
      * @param aciTuples {@link org.apache.directory.shared.ldap.aci.ACITuple}s translated from {@link org.apache.directory.shared.ldap.aci.ACIItem}s in the subtree entries
+     * @param entryView in case of a Modify operation, view of the entry being modified as if the modification permitted and completed
      */
     public boolean hasPermission( PartitionNexusProxy proxy, Collection<Name> userGroupNames, LdapDN userName,
                                   AuthenticationLevel authenticationLevel, LdapDN entryName, String attrId, Object attrValue,
-                                  Collection<MicroOperation> microOperations, Collection<ACITuple> aciTuples, Attributes entry ) throws NamingException
+                                  Collection<MicroOperation> microOperations, Collection<ACITuple> aciTuples, Attributes entry, Attributes entryView ) throws NamingException
     {
         if ( entryName == null )
         {
@@ -207,7 +209,7 @@
         for ( ACITupleFilter filter : filters )
         {
             aciTuples = filter.filter( aciTuples, scope, proxy, userGroupNames, userName, userEntry,
-                authenticationLevel, entryName, attrId, attrValue, entry, microOperations );
+                authenticationLevel, entryName, attrId, attrValue, entry, microOperations, entryView );
         }
 
         // Deny access if no tuples left.

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java Tue Oct  9 03:37:45 2007
@@ -59,9 +59,9 @@
      * @param attrValue the value of the attribute the current user accesses
      * @param entry the {@link Attributes} of the entry the current user accesses
      * @param microOperations the set of {@link MicroOperation}s the current user will perform
-     * 
+     * @param entryView in case of a Modify operation, view of the entry being modified as if the modification permitted and completed
      * @return the collection of filtered tuples
-     * @throws NamingException if failed to filter the specifiec tuples
+     * @throws NamingException if failed to filter the specific tuples
      */
     Collection<ACITuple> filter( 
             Collection<ACITuple> tuples, 
@@ -75,6 +75,7 @@
             String attrId,
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException;
 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilter.java Tue Oct  9 03:37:45 2007
@@ -55,7 +55,8 @@
             String attrId, 
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException
     {
         if ( tuples.size() <= 1 )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxImmSubFilter.java Tue Oct  9 03:37:45 2007
@@ -86,7 +86,8 @@
             String attrId, 
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException
     {
         if ( entryName.size() == 0 )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MaxValueCountFilter.java Tue Oct  9 03:37:45 2007
@@ -58,7 +58,8 @@
             String attrId, 
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException
     {
         if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )
@@ -85,7 +86,7 @@
                 if ( item instanceof ProtectedItem.MaxValueCount )
                 {
                     ProtectedItem.MaxValueCount mvc = ( ProtectedItem.MaxValueCount ) item;
-                    if ( isRemovable( mvc, attrId, entry ) )
+                    if ( isRemovable( mvc, attrId, entryView ) )
                     {
                         i.remove();
                         break;
@@ -98,16 +99,16 @@
     }
 
 
-    private boolean isRemovable( ProtectedItem.MaxValueCount mvc, String attrId, Attributes entry )
+    private boolean isRemovable( ProtectedItem.MaxValueCount mvc, String attrId, Attributes entryView )
     {
         for ( Iterator<ProtectedItem.MaxValueCountItem> k = mvc.iterator(); k.hasNext(); )
         {
             MaxValueCountItem mvcItem = k.next();
             if ( attrId.equalsIgnoreCase( mvcItem.getAttributeType() ) )
             {
-                Attribute attr = entry.get( attrId );
+                Attribute attr = entryView.get( attrId );
                 int attrCount = attr == null ? 0 : attr.size();
-                if ( attrCount >= mvcItem.getMaxCount() )
+                if ( attrCount > mvcItem.getMaxCount() )
                 {
                     return true;
                 }

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MicroOperationFilter.java Tue Oct  9 03:37:45 2007
@@ -56,7 +56,8 @@
                 String attrId, 
                 Object attrValue, 
                 Attributes entry, 
-                Collection<MicroOperation> microOperations )
+                Collection<MicroOperation> microOperations,
+                Attributes entryView )
         throws NamingException
     {
         if ( tuples.size() == 0 )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilter.java Tue Oct  9 03:37:45 2007
@@ -64,7 +64,8 @@
             String attrId, 
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException
     {
         if ( tuples.size() <= 1 )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilter.java Tue Oct  9 03:37:45 2007
@@ -62,7 +62,8 @@
             String attrId, 
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException
     {
         if ( tuples.size() <= 1 )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Tue Oct  9 03:37:45 2007
@@ -82,7 +82,8 @@
             String attrId,
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException
     {
         if ( tuples.size() == 0 )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java Tue Oct  9 03:37:45 2007
@@ -69,7 +69,8 @@
             String attrId, 
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException
     {
         if ( tuples.size() == 0 )

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java (original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authz/support/RestrictedByFilter.java Tue Oct  9 03:37:45 2007
@@ -58,7 +58,8 @@
             String attrId, 
             Object attrValue, 
             Attributes entry, 
-            Collection<MicroOperation> microOperations )
+            Collection<MicroOperation> microOperations,
+            Attributes entryView )
         throws NamingException
     {
         if ( scope != OperationScope.ATTRIBUTE_TYPE_AND_VALUE )

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/HighestPrecedenceFilterTest.java Tue Oct  9 03:37:45 2007
@@ -56,7 +56,7 @@
     {
         HighestPrecedenceFilter filter = new HighestPrecedenceFilter();
         Assert.assertEquals( 0, filter.filter( AT_EMPTY_COLLECTION, null, null, null, null, null, null, null, null, null,
-            null, null ).size() );
+            null, null, null ).size() );
     }
 
 
@@ -69,7 +69,7 @@
         tuples = Collections.unmodifiableCollection( tuples );
         
         Assert.assertEquals( tuples, filter.filter( tuples, null, null, null, null, null, null, null, null, null, null,
-            null ) );
+            null, null ) );
     }
 
 
@@ -88,7 +88,7 @@
         tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PI_EMPTY_COLLECTION, MO_EMPTY_SET, true,
             MAX_PRECEDENCE / 3 ) );
 
-        tuples = filter.filter( tuples, null, null, null, null, null, null, null, null, null, null, null );
+        tuples = filter.filter( tuples, null, null, null, null, null, null, null, null, null, null, null, null );
 
         for ( ACITuple tuple:tuples )
         {

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java Tue Oct  9 03:37:45 2007
@@ -90,10 +90,10 @@
         tuples = Collections.unmodifiableCollection( tuples );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, null, null,
-            null, ENTRY_NAME, null, null, ENTRY, null ) );
+            null, ENTRY_NAME, null, null, ENTRY, null, null ) );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null,
-            null, null, ENTRY_NAME, null, null, ENTRY, null ) );
+            null, null, ENTRY_NAME, null, null, ENTRY, null, null ) );
     }
 
 
@@ -108,7 +108,7 @@
         tuples = Collections.unmodifiableCollection( tuples );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null,
-            ROOTDSE_NAME, null, null, ENTRY, null ) );
+            ROOTDSE_NAME, null, null, ENTRY, null, null ) );
     }
 
 
@@ -117,7 +117,7 @@
         MaxImmSubFilter filter = new MaxImmSubFilter();
 
         Assert.assertEquals( 0, filter.filter( EMPTY_ACI_TUPLE_COLLECTION, OperationScope.ENTRY, null, null, null, null, null,
-            ENTRY_NAME, null, null, ENTRY, null ).size() );
+            ENTRY_NAME, null, null, ENTRY, null, null ).size() );
     }
 
 
@@ -131,7 +131,7 @@
         tuples = Collections.unmodifiableCollection( tuples );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null,
-            ENTRY_NAME, null, null, ENTRY, null ) );
+            ENTRY_NAME, null, null, ENTRY, null, null ) );
     }
 
 
@@ -143,10 +143,10 @@
             PROTECTED_ITEMS, EMPTY_MICRO_OPERATION_SET, true, 0 ) );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, new MockProxy( 1 ), null, null, null,
-            null, ENTRY_NAME, null, null, ENTRY, null ).size() );
+            null, ENTRY_NAME, null, null, ENTRY, null, null ).size() );
 
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, new MockProxy( 3 ), null, null, null,
-            null, ENTRY_NAME, null, null, ENTRY, null ).size() );
+            null, ENTRY_NAME, null, null, ENTRY, null, null ).size() );
     }
 
     class MockProxy extends PartitionNexusProxy

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java Tue Oct  9 03:37:45 2007
@@ -73,6 +73,7 @@
         Attribute attr = new AttributeImpl( "testAttr" );
         attr.add( "1" );
         attr.add( "2" );
+        attr.add( "3" );
         FULL_ENTRY.put( attr );
     }
 
@@ -87,10 +88,10 @@
         tuples = Collections.unmodifiableCollection( tuples );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, null, null,
-            null, null, null, null, null, null ) );
+            null, null, null, null, null, null, null ) );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null,
-            null, null, null, null ) );
+            null, null, null, null, null ) );
     }
 
 
@@ -99,7 +100,7 @@
         MaxValueCountFilter filter = new MaxValueCountFilter();
 
         Assert.assertEquals( 0, filter.filter( EMPTY_ACI_TUPLE_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, 
-            null, null, null, null, null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null, null, null, null, null ).size() );
     }
 
 
@@ -113,9 +114,9 @@
         tuples = Collections.unmodifiableCollection( tuples );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null,
-            null, null, null, "testAttr", null, ENTRY, null ) );
+            null, null, null, "testAttr", null, ENTRY, null, null ) );
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null,
-            null, null, null, "testAttr", null, FULL_ENTRY, null ) );
+            null, null, null, "testAttr", null, FULL_ENTRY, null, null ) );
     }
 
 
@@ -127,9 +128,9 @@
             EMPTY_MICRO_OPERATION_SET, true, 0 ) );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
-            null, null, "testAttr", null, ENTRY, null ).size() );
+            null, null, "testAttr", null, ENTRY, null, ENTRY ).size() );
 
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
-            null, null, "testAttr", null, FULL_ENTRY, null ).size() );
+            null, null, "testAttr", null, FULL_ENTRY, null, FULL_ENTRY ).size() );
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MicroOperationFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MicroOperationFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MicroOperationFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MicroOperationFilterTest.java Tue Oct  9 03:37:45 2007
@@ -71,7 +71,7 @@
         MicroOperationFilter filter = new MicroOperationFilter();
 
         Assert.assertEquals( 0, filter.filter( EMPTY_ACI_TUPLE_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, 
-            null, null, null, null, null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null, null, null, null, null ).size() );
     }
 
 
@@ -84,8 +84,8 @@
             TUPLE_OPERATIONS, true, 0 ) );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null,
-            null, null, USER_OPERATIONS_A ).size() );
+            null, null, USER_OPERATIONS_A, null ).size() );
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null,
-            null, null, USER_OPERATIONS_B ).size() );
+            null, null, USER_OPERATIONS_B, null ).size() );
     }
 }

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificProtectedItemFilterTest.java Tue Oct  9 03:37:45 2007
@@ -148,13 +148,13 @@
         MostSpecificProtectedItemFilter filter = new MostSpecificProtectedItemFilter();
 
         Assert.assertEquals( 0, filter.filter( EMPTY_ACI_TUPLE_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null,
-            null, null, null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null, null, null ).size() );
 
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
         tuples.add( new ACITuple( EMPTY_USER_CLASS_COLLECTION, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION, EMPTY_MICRO_OPERATION_SET, false, 0 ) );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
-            null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null ).size() );
     }
 
 
@@ -164,7 +164,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_A );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 4, tuples.size() );
         Assert.assertSame( TUPLES_A.get( 0 ), tuples.get( 0 ) );
@@ -180,7 +180,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_B );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 3, tuples.size() );
         Assert.assertSame( TUPLES_B.get( 0 ), tuples.get( 0 ) );
@@ -195,7 +195,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_C );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 2, tuples.size() );
         Assert.assertSame( TUPLES_C.get( 0 ), tuples.get( 0 ) );
@@ -209,7 +209,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_D );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 1, tuples.size() );
         Assert.assertSame( TUPLES_D.get( 0 ), tuples.get( 0 ) );
@@ -222,7 +222,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_E );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 2, tuples.size() );
         Assert.assertSame( TUPLES_E.get( 0 ), tuples.get( 0 ) );

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/MostSpecificUserClassFilterTest.java Tue Oct  9 03:37:45 2007
@@ -111,13 +111,13 @@
         MostSpecificUserClassFilter filter = new MostSpecificUserClassFilter();
 
         Assert.assertEquals( 0, filter.filter( EMPTY_ACI_TUPLE_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null,
-            null, null, null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null, null, null ).size() );
 
         Collection<ACITuple> tuples = new ArrayList<ACITuple>();
         tuples.add( new ACITuple( EMPTY_USER_CLASS_COLLECTION, AuthenticationLevel.NONE, EMPTY_PROTECTED_ITEM_COLLECTION, EMPTY_MICRO_OPERATION_SET, false, 0 ) );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
-            null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null ).size() );
     }
 
 
@@ -127,7 +127,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_A );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 2, tuples.size() );
         Assert.assertSame( TUPLES_A.get( 0 ), tuples.get( 0 ) );
@@ -141,7 +141,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_B );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 1, tuples.size() );
         Assert.assertSame( TUPLES_B.get( 0 ), tuples.get( 0 ) );
@@ -154,7 +154,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_C );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 1, tuples.size() );
         Assert.assertSame( TUPLES_C.get( 0 ), tuples.get( 0 ) );
@@ -167,7 +167,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_D );
         tuples = ( List<ACITuple> ) filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 1, tuples.size() );
         Assert.assertSame( TUPLES_D.get( 0 ), tuples.get( 0 ) );
@@ -180,7 +180,7 @@
 
         List<ACITuple> tuples = new ArrayList<ACITuple>( TUPLES_E );
         tuples = (List<ACITuple>)filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null, null, null,
-            null, null );
+            null, null, null );
 
         Assert.assertEquals( 2, tuples.size() );
         Assert.assertSame( TUPLES_E.get( 0 ), tuples.get( 0 ) );

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilterTest.java Tue Oct  9 03:37:45 2007
@@ -103,7 +103,7 @@
     public void testZeroTuple() throws Exception
     {
         Assert.assertEquals( 0, filterA.filter( EMPTY_ACI_TUPLE_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null,
-            null, null, null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null, null, null ).size() );
     }
 
 
@@ -112,7 +112,7 @@
         Collection<ACITuple> tuples = getTuples( ProtectedItem.ENTRY );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ENTRY, null, null, null, null,
-            AuthenticationLevel.NONE, null, "ou", null, null, null ).size() );
+            AuthenticationLevel.NONE, null, "ou", null, null, null, null ).size() );
     }
 
 
@@ -122,12 +122,12 @@
 
         // Test wrong scope
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "userAttr", null, null, null ).size() );
+            "userAttr", null, null, null, null ).size() );
 
         tuples = getTuples( ProtectedItem.ALL_USER_ATTRIBUTE_TYPES );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, USER_NAME, null,
-            null, null, "userAttr", null, null, null ).size() );
+            null, null, "userAttr", null, null, null, null ).size() );
 
         /* Not used anymore
          Assert.assertEquals(
@@ -145,12 +145,12 @@
 
         // Test wrong scope
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "userAttr", null, null, null ).size() );
+            "userAttr", null, null, null, null ).size() );
 
         tuples = getTuples( ProtectedItem.ALL_USER_ATTRIBUTE_TYPES_AND_VALUES );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, USER_NAME, null,
-            null, null, "userAttr", null, null, null ).size() );
+            null, null, "userAttr", null, null, null, null ).size() );
 
         /* Not used anymore
          Assert.assertEquals(
@@ -170,15 +170,15 @@
 
         // Test wrong scope
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "attrA", null, null, null ).size() );
+            "attrA", null, null, null, null ).size() );
 
         tuples = getTuples( new ProtectedItem.AllAttributeValues( attrTypes ) );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME, null,
-            null, null, "attrA", null, null, null ).size() );
+            null, null, "attrA", null, null, null, null ).size() );
 
         Assert.assertEquals( 0, filterB.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME, null,
-            null, null, "attrB", null, null, null ).size() );
+            null, null, "attrB", null, null, null, null ).size() );
     }
 
 
@@ -190,15 +190,15 @@
 
         // Test wrong scope
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "attrA", null, null, null ).size() );
+            "attrA", null, null, null, null ).size() );
 
         tuples = getTuples( new ProtectedItem.AttributeType( attrTypes ) );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, USER_NAME, null,
-            null, null, "attrA", null, null, null ).size() );
+            null, null, "attrA", null, null, null, null ).size() );
 
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, USER_NAME, null,
-            null, null, "attrB", null, null, null ).size() );
+            null, null, "attrB", null, null, null, null ).size() );
     }
 
 
@@ -210,23 +210,23 @@
 
         // Test wrong scope
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "attrA", null, null, null ).size() );
+            "attrA", null, null, null, null ).size() );
         tuples = getTuples( new ProtectedItem.AttributeValue( attributes ) );
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, USER_NAME, null,
-            null, null, "attrA", null, null, null ).size() );
+            null, null, "attrA", null, null, null, null ).size() );
 
         tuples = getTuples( new ProtectedItem.AttributeValue( attributes ) );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrA", "valueA", null, null ).size() );
+            null, null, null, "attrA", "valueA", null, null, null ).size() );
 
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrA", "valueB", null, null ).size() );
+            null, null, null, "attrA", "valueB", null, null, null ).size() );
 
         tuples = getTuples( new ProtectedItem.AttributeValue( attributes ) );
 
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrB", "valueA", null, null ).size() );
+            null, null, null, "attrB", "valueA", null, null, null ).size() );
     }
 
 
@@ -242,7 +242,7 @@
 
         // Should always retain ruples.
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "attrA", null, null, null ).size() );
+            "attrA", null, null, null, null ).size() );
     }
 
 
@@ -254,18 +254,18 @@
 
         // Test wrong scope
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "attrA", null, null, null ).size() );
+            "attrA", null, null, null, null ).size() );
         tuples = getTuples( new ProtectedItem.MaxValueCount( mvcItems ) );
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, USER_NAME, null,
-            null, null, "attrA", null, null, null ).size() );
+            null, null, "attrA", null, null, null, null ).size() );
 
         tuples = getTuples( new ProtectedItem.MaxValueCount( mvcItems ) );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrA", null, null, null ).size() );
+            null, null, null, "attrA", null, null, null, null ).size() );
 
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrB", null, null, null ).size() );
+            null, null, null, "attrB", null, null, null, null ).size() );
     }
 
 
@@ -296,18 +296,18 @@
 
         // Test wrong scope
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "attrA", null, null, null ).size() );
+            "attrA", null, null, null, null ).size() );
         tuples = getTuples( new ProtectedItem.RestrictedBy( rbItems ) );
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, USER_NAME, null,
-            null, null, "attrA", null, null, null ).size() );
+            null, null, "attrA", null, null, null, null ).size() );
 
         tuples = getTuples( new ProtectedItem.RestrictedBy( rbItems ) );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrA", null, null, null ).size() );
+            null, null, null, "attrA", null, null, null, null ).size() );
 
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrB", null, null, null ).size() );
+            null, null, null, "attrB", null, null, null, null ).size() );
     }
 
 
@@ -322,20 +322,20 @@
 
         // Test wrong scope
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null, null, null,
-            "attrA", null, entry, null ).size() );
+            "attrA", null, entry, null, null ).size() );
 
         tuples = getTuples( new ProtectedItem.SelfValue( attrTypes ) );
 
         Assert.assertEquals( 1, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrA", null, entry, null ).size() );
+            null, null, null, "attrA", null, entry, null, null ).size() );
 
         entry.remove( "attrA" );
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrA", null, entry, null ).size() );
+            null, null, null, "attrA", null, entry, null, null ).size() );
 
         tuples = getTuples( new ProtectedItem.SelfValue( attrTypes ) );
         Assert.assertEquals( 0, filterA.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, USER_NAME,
-            null, null, null, "attrB", null, entry, null ).size() );
+            null, null, null, "attrB", null, entry, null, null ).size() );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java Tue Oct  9 03:37:45 2007
@@ -88,7 +88,7 @@
     public void testZeroTuple() throws Exception
     {
         Assert.assertEquals( 0, filter.filter( EMPTY_ACI_TUPLE_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null,
-            null, null, null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null, null, null ).size() );
     }
 
 
@@ -97,7 +97,7 @@
         Collection<ACITuple> tuples = getTuples( UserClass.ALL_USERS );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null,
-            AuthenticationLevel.NONE, null, null, null, null, null ).size() );
+            AuthenticationLevel.NONE, null, null, null, null, null, null ).size() );
     }
 
 
@@ -106,9 +106,9 @@
         Collection<ACITuple> tuples = getTuples( UserClass.THIS_ENTRY );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null,
-            AuthenticationLevel.NONE, USER_NAME, null, null, null, null ).size() );
+            AuthenticationLevel.NONE, USER_NAME, null, null, null, null, null ).size() );
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null,
-            AuthenticationLevel.NONE, new LdapDN( "ou=unrelated" ), null, null, null, null ).size() );
+            AuthenticationLevel.NONE, new LdapDN( "ou=unrelated" ), null, null, null, null, null ).size() );
     }
 
 
@@ -116,10 +116,10 @@
     {
         Collection<ACITuple> tuples = getTuples( new UserClass.Name( USER_NAMES ) );
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, USER_NAME, null,
-            AuthenticationLevel.NONE, null, null, null, null, null ).size() );
+            AuthenticationLevel.NONE, null, null, null, null, null, null ).size() );
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, null,
             new LdapDN( "ou=unrelateduser, ou=users" ), null, AuthenticationLevel.NONE, USER_NAME, null, null, null,
-            null ).size() );
+            null, null ).size() );
     }
 
 
@@ -127,13 +127,13 @@
     {
         Collection<ACITuple> tuples = getTuples( new UserClass.UserGroup( GROUP_NAMES ) );
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, GROUP_NAMES, USER_NAME, null,
-            AuthenticationLevel.NONE, null, null, null, null, null ).size() );
+            AuthenticationLevel.NONE, null, null, null, null, null, null ).size() );
 
         Set<Name> wrongGroupNames = new HashSet<Name>();
         wrongGroupNames.add( new LdapDN( "ou=unrelatedgroup" ) );
 
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, wrongGroupNames, USER_NAME, null,
-            AuthenticationLevel.NONE, USER_NAME, null, null, null, null ).size() );
+            AuthenticationLevel.NONE, USER_NAME, null, null, null, null, null ).size() );
     }
 
 
@@ -148,24 +148,24 @@
         Collection<ACITuple> tuples = getTuples( AuthenticationLevel.SIMPLE, true );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null,
-            AuthenticationLevel.STRONG, null, null, null, null, null ).size() );
+            AuthenticationLevel.STRONG, null, null, null, null, null, null ).size() );
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null,
-            AuthenticationLevel.SIMPLE, null, null, null, null, null ).size() );
+            AuthenticationLevel.SIMPLE, null, null, null, null, null, null ).size() );
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null,
-            AuthenticationLevel.NONE, null, null, null, null, null ).size() );
+            AuthenticationLevel.NONE, null, null, null, null, null, null ).size() );
 
         tuples = getTuples( AuthenticationLevel.SIMPLE, false );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null,
-            AuthenticationLevel.NONE, null, null, null, null, null ).size() );
+            AuthenticationLevel.NONE, null, null, null, null, null, null ).size() );
 
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null,
-            AuthenticationLevel.STRONG, null, null, null, null, null ).size() );
+            AuthenticationLevel.STRONG, null, null, null, null, null, null ).size() );
 
         tuples = getTuples( AuthenticationLevel.SIMPLE, false );
 
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null,
-            AuthenticationLevel.SIMPLE, null, null, null, null, null ).size() );
+            AuthenticationLevel.SIMPLE, null, null, null, null, null, null ).size() );
     }
 
 

Modified: directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java?rev=583101&r1=583100&r2=583101&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java (original)
+++ directory/apacheds/branches/bigbang/core/src/test/java/org/apache/directory/server/core/authz/support/RestrictedByFilterTest.java Tue Oct  9 03:37:45 2007
@@ -83,10 +83,10 @@
         tuples = Collections.unmodifiableCollection( tuples );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE, null, null, null, null,
-            null, null, null, null, null, null ) );
+            null, null, null, null, null, null, null ) );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ENTRY, null, null, null, null, null, null,
-            null, null, null, null ) );
+            null, null, null, null, null ) );
     }
 
 
@@ -95,7 +95,7 @@
         RestrictedByFilter filter = new RestrictedByFilter();
 
         Assert.assertEquals( 0, filter.filter( AT_EMPTY_COLLECTION, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null,
-            null, null, null, null, null, null, null, null ).size() );
+            null, null, null, null, null, null, null, null, null ).size() );
     }
 
 
@@ -108,7 +108,7 @@
         tuples = Collections.unmodifiableCollection( tuples );
 
         Assert.assertEquals( tuples, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null,
-            null, null, null, "testAttr", null, ENTRY, null ) );
+            null, null, null, "testAttr", null, ENTRY, null, null ) );
     }
 
 
@@ -119,12 +119,12 @@
         tuples.add( new ACITuple( UC_EMPTY_COLLECTION, AuthenticationLevel.NONE, PROTECTED_ITEMS, MO_EMPTY_SET, true, 0 ) );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
-            null, null, "choice", "1", ENTRY, null ).size() );
+            null, null, "choice", "1", ENTRY, null, null ).size() );
 
         Assert.assertEquals( 1, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
-            null, null, "choice", "2", ENTRY, null ).size() );
+            null, null, "choice", "2", ENTRY, null, null ).size() );
 
         Assert.assertEquals( 0, filter.filter( tuples, OperationScope.ATTRIBUTE_TYPE_AND_VALUE, null, null, null, null,
-            null, null, "choice", "3", ENTRY, null ).size() );
+            null, null, "choice", "3", ENTRY, null, null ).size() );
     }
 }



Mime
View raw message