[exo-jcr-commits] exo-jcr SVN: r4312 - in core/branches/2.3.x/patch: 2.3.9 and 1 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Apr 27 08:53:16 EDT 2011


Author: tolusha
Date: 2011-04-27 08:53:16 -0400 (Wed, 27 Apr 2011)
New Revision: 4312

Added:
   core/branches/2.3.x/patch/2.3.9/
   core/branches/2.3.x/patch/2.3.9/COR-235/
   core/branches/2.3.x/patch/2.3.9/COR-235/COR-235.patch
Log:
COR-235: patch proposed

Added: core/branches/2.3.x/patch/2.3.9/COR-235/COR-235.patch
===================================================================
--- core/branches/2.3.x/patch/2.3.9/COR-235/COR-235.patch	                        (rev 0)
+++ core/branches/2.3.x/patch/2.3.9/COR-235/COR-235.patch	2011-04-27 12:53:16 UTC (rev 4312)
@@ -0,0 +1,35 @@
+Index: exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/SimpleLdapUserListAccess.java
+===================================================================
+--- exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/SimpleLdapUserListAccess.java	(revision 4240)
++++ exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/SimpleLdapUserListAccess.java	(working copy)
+@@ -59,6 +59,7 @@
+    /**
+     * {@inheritDoc}
+     */
++   @Override
+    protected User[] load(LdapContext ctx, int index, int length) throws Exception
+    {
+       User[] users = new User[length];
+@@ -69,7 +70,14 @@
+          SortControl sctl = new SortControl(new String[]{ldapAttrMapping.userUsernameAttr}, Control.NONCRITICAL);
+          ctx.setRequestControls(new Control[]{sctl});
+ 
++         // returns only needed attributes for creation UserImpl in
++         // LDAPAttributeMapping.attributesToUser() method 
++         String[] returnedAtts =
++            {ldapAttrMapping.userUsernameAttr, ldapAttrMapping.userFirstNameAttr, ldapAttrMapping.userLastNameAttr,
++               ldapAttrMapping.userDisplayNameAttr, ldapAttrMapping.userMailAttr, ldapAttrMapping.userPassword};
++
+          SearchControls constraints = new SearchControls();
++         constraints.setReturningAttributes(returnedAtts);
+          constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
+ 
+          results = ctx.search(searchBase, filter, constraints);
+@@ -101,6 +109,7 @@
+    /**
+     * {@inheritDoc}
+     */
++   @Override
+    protected int getSize(LdapContext ctx) throws Exception
+    {
+       if (size < 0)



More information about the exo-jcr-commits mailing list