directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1102672 - in /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz: GroupCache.java TupleCache.java
Date Fri, 13 May 2011 11:08:59 GMT
Author: elecharny
Date: Fri May 13 11:08:59 2011
New Revision: 1102672

URL: http://svn.apache.org/viewvc?rev=1102672&view=rev
Log:
Modified the search for entries containing the prescriptiveACI AT, as it's an operational
attribute. It was not get back from the backend, thus the TupleCache was not correctly updated.

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=1102672&r1=1102671&r2=1102672&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
Fri May 13 11:08:59 2011
@@ -38,8 +38,8 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
+import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
@@ -150,7 +150,8 @@ public class GroupCache
             Dn baseDn = dnFactory.create( suffix );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-            
+            ctls.setReturningAttributes( new String[]{ "*", "+" } );
+
             SearchOperationContext searchOperationContext = new SearchOperationContext( session,
                 baseDn, filter, ctls );
             searchOperationContext.setAliasDerefMode( AliasDerefMode.DEREF_ALWAYS );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=1102672&r1=1102671&r2=1102672&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
Fri May 13 11:08:59 2011
@@ -40,8 +40,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.apache.directory.shared.ldap.aci.ACITuple;
 import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Attribute;
+import org.apache.directory.shared.ldap.model.entry.Entry;
 import org.apache.directory.shared.ldap.model.entry.Modification;
 import org.apache.directory.shared.ldap.model.entry.StringValue;
 import org.apache.directory.shared.ldap.model.entry.Value;
@@ -132,6 +132,7 @@ public class TupleCache
                 new StringValue( SchemaConstants.ACCESS_CONTROL_SUBENTRY_OC ) );
             SearchControls ctls = new SearchControls();
             ctls.setSearchScope( SearchControls.SUBTREE_SCOPE );
+            ctls.setReturningAttributes( new String[]{ "*", "+" } );
 
             SearchOperationContext searchOperationContext = new SearchOperationContext( session,
                 baseDn, filter, ctls );
@@ -280,11 +281,13 @@ public class TupleCache
     @SuppressWarnings("unchecked")
     public List<ACITuple> getACITuples( String subentryDn )
     {
-        List aciTuples = tuples.get( subentryDn );
+        List<ACITuple> aciTuples = tuples.get( subentryDn );
+        
         if ( aciTuples == null )
         {
             return Collections.EMPTY_LIST;
         }
+        
         return Collections.unmodifiableList( aciTuples );
     }
 



Mime
View raw message