mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
8019: Merged V2.1 to V2.2 7715: Fix for AWC-1753 7725: Additional files for AWC-1753 - also fixes unreported issue of OK button not being highlighted when editing post until you press a key 7726: Additional files for AWC-1753 - also fixes unreported issue of OK button not being highlighted when editing post until you press a key 7731: Added support for Range and Content-Range headers to support Download managers and Resume features for HTTP downloads 7967: Workaround for ACT-771: Missing AVM Store system descriptor properties prevents system startup 7980: AWC-1662: Fixed NPE when searching for users 7981: Fix for AWC-1661: Can't edit details of user who has had their home space removed 7988: NodeRef + child path relative URLs support for DownloadContentServlet 8003: Fix for AWC-1795 8004: Fix http://issues.alfresco.com/browse/AR-1807 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8461 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -341,6 +341,8 @@ public abstract class BaseInviteUsersWizard extends BaseWizardBean
|
||||
tx = Repository.getUserTransaction(context, true);
|
||||
tx.begin();
|
||||
|
||||
List<SelectItem> results = new ArrayList<SelectItem>();
|
||||
|
||||
if (filterIndex == 0)
|
||||
{
|
||||
// Use lucene search to retrieve user details
|
||||
@@ -358,16 +360,18 @@ public abstract class BaseInviteUsersWizard extends BaseWizardBean
|
||||
SearchService.LANGUAGE_LUCENE,
|
||||
query.toString());
|
||||
List<NodeRef> nodes = resultSet.getNodeRefs();
|
||||
|
||||
items = new SelectItem[nodes.size()];
|
||||
|
||||
for (int index=0; index<nodes.size(); index++)
|
||||
{
|
||||
NodeRef personRef = nodes.get(index);
|
||||
String firstName = (String)this.getNodeService().getProperty(personRef, ContentModel.PROP_FIRSTNAME);
|
||||
String lastName = (String)this.getNodeService().getProperty(personRef, ContentModel.PROP_LASTNAME);
|
||||
String username = (String)this.getNodeService().getProperty(personRef, ContentModel.PROP_USERNAME);
|
||||
SelectItem item = new SortableSelectItem(username, firstName + " " + lastName + " [" + username + "]", lastName);
|
||||
items[index] = item;
|
||||
if (username != null)
|
||||
{
|
||||
SelectItem item = new SortableSelectItem(username, firstName + " " + lastName + " [" + username + "]", lastName);
|
||||
results.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -375,8 +379,7 @@ public abstract class BaseInviteUsersWizard extends BaseWizardBean
|
||||
// groups - simple text based match on name
|
||||
Set<String> groups = getAuthorityService().getAllAuthorities(AuthorityType.GROUP);
|
||||
groups.addAll(getAuthorityService().getAllAuthorities(AuthorityType.EVERYONE));
|
||||
|
||||
List<SelectItem> results = new ArrayList<SelectItem>(groups.size());
|
||||
|
||||
String containsLower = contains.trim().toLowerCase();
|
||||
int offset = PermissionService.GROUP_PREFIX.length();
|
||||
for (String group : groups)
|
||||
@@ -386,10 +389,10 @@ public abstract class BaseInviteUsersWizard extends BaseWizardBean
|
||||
results.add(new SortableSelectItem(group, group.substring(offset), group));
|
||||
}
|
||||
}
|
||||
items = new SelectItem[results.size()];
|
||||
results.toArray(items);
|
||||
}
|
||||
|
||||
items = new SelectItem[results.size()];
|
||||
results.toArray(items);
|
||||
Arrays.sort(items);
|
||||
|
||||
// commit the transaction
|
||||
|
Reference in New Issue
Block a user