directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r158334 - in directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor: Authorizer.java DefaultAttributeTagger.java SchemaManager.java
Date Sun, 20 Mar 2005 16:11:09 GMT
Author: trustin
Date: Sun Mar 20 08:11:09 2005
New Revision: 158334

URL: http://svn.apache.org/viewcvs?view=rev&rev=158334
Log:
Fixed: SearchResultFilter was not applied to List operation.

Modified:
    directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/Authorizer.java
    directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/DefaultAttributeTagger.java
    directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/SchemaManager.java

Modified: directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/Authorizer.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/Authorizer.java?view=diff&r1=158333&r2=158334
==============================================================================
--- directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/Authorizer.java
(original)
+++ directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/Authorizer.java
Sun Mar 20 08:11:09 2005
@@ -38,6 +38,7 @@
 import org.apache.ldap.server.jndi.call.Call;
 import org.apache.ldap.server.jndi.call.Delete;
 import org.apache.ldap.server.jndi.call.HasEntry;
+import org.apache.ldap.server.jndi.call.List;
 import org.apache.ldap.server.jndi.call.Lookup;
 import org.apache.ldap.server.jndi.call.LookupWithAttrIds;
 import org.apache.ldap.server.jndi.call.Modify;
@@ -388,6 +389,27 @@
         LdapContext ctx = ( LdapContext ) call.getContextStack().peek();
         e = ( NamingEnumeration ) call.getResponse();
         retval = new ResultFilteringEnumeration( e, searchControls, ctx,
+            new SearchResultFilter()
+            {
+                public boolean accept( LdapContext ctx, SearchResult result,
+                                       SearchControls controls )
+                        throws NamingException
+                {
+                    return Authorizer.this.isSearchable( ctx, result );
+                }
+            } );
+
+        call.setResponse( retval );
+    }
+
+    protected void process(NextInterceptor nextInterceptor, List call) throws NamingException
{
+        super.process(nextInterceptor, call);
+        
+        NamingEnumeration e ;
+        ResultFilteringEnumeration retval;
+        LdapContext ctx = ( LdapContext ) call.getContextStack().peek();
+        e = ( NamingEnumeration ) call.getResponse();
+        retval = new ResultFilteringEnumeration( e, null, ctx,
             new SearchResultFilter()
             {
                 public boolean accept( LdapContext ctx, SearchResult result,

Modified: directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/DefaultAttributeTagger.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/DefaultAttributeTagger.java?view=diff&r1=158333&r2=158334
==============================================================================
--- directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/DefaultAttributeTagger.java
(original)
+++ directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/DefaultAttributeTagger.java
Sun Mar 20 08:11:09 2005
@@ -38,6 +38,7 @@
 import org.apache.ldap.server.db.ResultFilteringEnumeration;
 import org.apache.ldap.server.db.SearchResultFilter;
 import org.apache.ldap.server.jndi.call.Add;
+import org.apache.ldap.server.jndi.call.List;
 import org.apache.ldap.server.jndi.call.Lookup;
 import org.apache.ldap.server.jndi.call.LookupWithAttrIds;
 import org.apache.ldap.server.jndi.call.Modify;
@@ -240,6 +241,17 @@
 
         Attributes retval = ( Attributes ) attributes.clone();
         filter( call.getName(), retval, call.getAttributeIds() );
+        call.setResponse( retval );
+    }
+
+    protected void process(NextInterceptor nextInterceptor, List call) throws NamingException
{
+        nextInterceptor.process( call );
+        
+        NamingEnumeration e ;
+        ResultFilteringEnumeration retval;
+        LdapContext ctx = ( LdapContext ) call.getContextStack().peek();
+        e = ( NamingEnumeration ) call.getResponse();
+        retval = new ResultFilteringEnumeration( e, new SearchControls(), ctx, SEARCH_FILTER
);
         call.setResponse( retval );
     }
 

Modified: directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/SchemaManager.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/SchemaManager.java?view=diff&r1=158333&r2=158334
==============================================================================
--- directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/SchemaManager.java
(original)
+++ directory/apacheds/branches/interceptor_revamp/core/src/main/java/org/apache/ldap/server/jndi/call/interceptor/SchemaManager.java
Sun Mar 20 08:11:09 2005
@@ -51,6 +51,7 @@
 import org.apache.ldap.server.db.ResultFilteringEnumeration;
 import org.apache.ldap.server.db.SearchResultFilter;
 import org.apache.ldap.server.jndi.ServerLdapContext;
+import org.apache.ldap.server.jndi.call.List;
 import org.apache.ldap.server.jndi.call.Lookup;
 import org.apache.ldap.server.jndi.call.LookupWithAttrIds;
 import org.apache.ldap.server.jndi.call.Search;
@@ -115,6 +116,17 @@
     
     public void destroy()
     {
+    }
+
+    protected void process(NextInterceptor nextInterceptor, List call) throws NamingException
{
+        nextInterceptor.process( call );
+        
+        NamingEnumeration e ;
+        ResultFilteringEnumeration retval;
+        LdapContext ctx = ( LdapContext ) call.getContextStack().peek();
+        e = ( NamingEnumeration ) call.getResponse();
+        retval = new ResultFilteringEnumeration( e, new SearchControls(), ctx, binaryAttributeFilter
);
+        call.setResponse( retval );
     }
 
     protected void process( NextInterceptor nextInterceptor, Search call ) throws NamingException



Mime
View raw message