Author: paristote
Date: 2011-05-10 05:16:39 -0400 (Tue, 10 May 2011)
New Revision: 4353
Added:
core/branches/2.3.x/patch/2.3.9/COR-235/readme.txt
Modified:
core/branches/2.3.x/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/SimpleLdapUserListAccess.java
Log:
COR-235
What is the problem to fix?
org.exoplatform.services.organization.ldap.LDAPUserPageList#getAll() returns only the
list of usernames
How is the problem fixed?
Add to returned attributes others fields such as Display Name, Last Name, First Name,
email, password
Modified:
core/branches/2.3.x/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/SimpleLdapUserListAccess.java
===================================================================
---
core/branches/2.3.x/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/SimpleLdapUserListAccess.java 2011-05-10
04:34:27 UTC (rev 4352)
+++
core/branches/2.3.x/exo.core.component.organization.ldap/src/main/java/org/exoplatform/services/organization/ldap/SimpleLdapUserListAccess.java 2011-05-10
09:16:39 UTC (rev 4353)
@@ -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)
@@ -109,8 +118,12 @@
try
{
+ String[] returnedAtts = {ldapAttrMapping.userUsernameAttr};
+
SearchControls constraints = new SearchControls();
+ constraints.setReturningAttributes(returnedAtts);
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
+
results = ctx.search(searchBase, filter, constraints);
size = 0;
while (results.hasMoreElements())
Added: core/branches/2.3.x/patch/2.3.9/COR-235/readme.txt
===================================================================
--- core/branches/2.3.x/patch/2.3.9/COR-235/readme.txt (rev 0)
+++ core/branches/2.3.x/patch/2.3.9/COR-235/readme.txt 2011-05-10 09:16:39 UTC (rev 4353)
@@ -0,0 +1,69 @@
+Summary
+
+ Status: Only User names are returned with UIUserSelector Using LDAP
+ CCP Issue: CCP-911, Product Jira Issue: COR-235. Backport of COR-234.
+ Complexity: Low
+
+The Proposal
+Problem description
+
+What is the problem to fix?
+org.exoplatform.services.organization.ldap.LDAPUserPageList#getAll() returns only the
list of usernames
+Fix description
+
+How is the problem fixed?
+
+ Add to returned attributes others fields such as Display Name, Last Name, First Name,
email, password
+
+Patch information:
+Patch files: COR-235.patch
+
+Tests to perform
+
+Reproduction test
+* Steps to reproduce using Allinone 1.6.8 :
+
+ Go to Community Management Portlet
+ Open group Management
+ Click on select user
+ The list will show only usernames
+
+Tests performed at DevLevel
+
+ Manual testing: tomcat + LDAP Organization services + AD
+
+Tests performed at QA/Support Level
+*
+
+Documentation changes
+
+Documentation changes:
+ No
+
+Configuration changes
+
+Configuration changes:
+ No
+
+Will previous configuration continue to work?
+ Yes
+
+Risks and impacts
+
+Can this bug fix have any side effects on current client projects?
+ No
+
+Is there a performance risk/cost?
+ No
+
+Validation (PM/Support/QA)
+
+PM Comment
+* Validated
+
+Support Comment
+* Validated
+
+QA Feedbacks
+*
+
Show replies by date