mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2E to HEAD
17571: ETHREEOH-1863 - alfresco-webscript-framework.jar is not available in the alfresco-enterprise-sdk-3.1 - although the framework jar was already part of the SDK when I looked I have done some re-organising of - names and paths and added missing source files. By no means finished but its another step forward. 17581: Fix for ETHREEOH-3380 - upload servlet in Explorer does not handle well upload errors as no error message is displayed on the client browser. 17582: ETHREEOH-2760 - Sealing of standard library root scope objects to prevent script potentially interfering with another scripts processing. - Example provided to fix ACT ticket issue against fixed codeline. 17583: Fixed ETHREEOH-3458 "If the rss feed to display returns bad formatted data or is unavailable an ugly free marker error is displayed" - Rss urls pointing to a "missing resource"/"bad formated rss data" is now displayed as "Rss feed is unavailable"/"Can't read rss feed" (before they displayed freemarker error making it impossible to re-configure) - Title is now updated after config (therefore the change to return json instead of html) (before a page refresh was needed) - The new url is now updated in the "2nd" config dialog after it has been changed in the first (before page refresh was needed) - Removed un-internationalised string from config respons template 17584: ALFCOM-3675 - WebDAV script does not allow inline editing for documents with name in upper case. - Now allows any case, as per supplied patch. - Also added support for Office 2007 file types so they can now be opened in write mode via webdav in IE6/7 from the Explorer client. - Tested in IE6/7. 17585: Yet another fix for ETHREEOH-1733 - agenda view all days events fixed 17586: ETHREEOH-1843: /api/sites/*/memberships search is slow on specific query 17587: Add cluster lock for JPBM job/timer executor (for WCM submits in a clustered env - ETHREEOH-2230 / ETHREEOH-3319) 17590: New icons for View Original & View Working Copy actions 17591: ETHREEOH-2879 - Alfresco + OpenLDAP: Unable to retrieve user from repository. - Fixed SURF to handle users without (utterly bizarely) First or Last names or even, usefully, neither. 17592: Merged V3.2 to V3.1 17415: Fix for ETHREEOH-3293 - Editing user details on large user repository causes Hibernate exception. Fix for ETHREEOH-3294 - Extreemly slow repository performance adding a new user to large user repository via the Explorer Client admin console. 17593: Icon for doclib View In Browser action 17594: ETHREEOH-2864 - Share - Documents cannot be deleted (in "All Documents" view) 17595: ETHREEOH-3203: Impossibility to add comment to any object by SiteContributor user 17596: ETHREEOH-1469 - SMTP errors not reported when sending an invitation - now errors are reported. - may upset unit tests, i've fixed those I know about 17598: Fixed ETHREEOH-3445 "Admin Console - Group Search sometimes never displays results list" 17601: ETHREEOH-3382 - Share Sites menu is broken in "debug" mode. Reworked menu css. Removed unused footer component. 17602: Share global debug flags removed from web-framework-config-application.xml. Use share-config-custom.xml instead. 17603: Changed wording on Create/Edit Site dialogs from "Access" to "Visibility". "Access" was no longer accurate now that Moderated Sites' content is private to non-members. 17604: ETHREEOH-1469 - SMTP error when sending an invitation does not return a failure. - SiteServiceTest also needed "fixing" 17606: ETHREEOH-3475 - IE: Second search on add groups to site gets yui error but works. Related to YUI bug 2286608. YUI patched instead of all DataTable client code. (Patch removed from DocLib) 17607: ETHREEOH-3470 - "Add" button is unavailable if the group with the name of more than 60 characters is found 17608: Fixed invalid use of Forms validator. Validators updated to handle specific case anyway. 17610: Fixed ETHREEOH-3445 "Admin Console - Group Search sometimes never displays results list" - missed commit of non-default theme files 17612: Fixed ETHREEOH-3480 "Browse" button no longer works after Groups Admin console page is refreshed 17613: ETHREEOH-3450 Fixed illegal nested comment in web-client-config-custom.xml.sample 17616: Fix for ETHREEOH-2863 - Code cache memory leak observed in JVM 1.6 when script action calls another script which in turn calls other functions. - Fixed use of Rhino optimization level when executing string based scripts. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18160 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -39,6 +39,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.activities.ActivityType;
|
||||
import org.alfresco.repo.model.Repository;
|
||||
import org.alfresco.repo.search.QueryParameterDefImpl;
|
||||
import org.alfresco.repo.search.impl.lucene.LuceneQueryParser;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationContext;
|
||||
@@ -60,6 +61,8 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.QueryParameterDefinition;
|
||||
import org.alfresco.service.cmr.search.ResultSet;
|
||||
import org.alfresco.service.cmr.search.ResultSetRow;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.AccessPermission;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
@@ -1145,25 +1148,42 @@ public class SiteServiceImpl implements SiteService, SiteModel
|
||||
{
|
||||
boolean addUser = false;
|
||||
|
||||
NodeRef personRef = this.personService.getPerson(username);
|
||||
Map<QName, Serializable> props = this.nodeService.getProperties(personRef);
|
||||
String firstName = (String)props.get(ContentModel.PROP_FIRSTNAME);
|
||||
String lastName = (String)props.get(ContentModel.PROP_LASTNAME);
|
||||
final String lowFirstName = (firstName != null ? firstName.toLowerCase() : "");
|
||||
final String lowLastName = (lastName != null ? lastName.toLowerCase() : "");
|
||||
for (int i=0; i<nameFilters.length; i++)
|
||||
String query = "+TYPE:\"cm:person\" +@cm\\:userName:\"" + username + "\"";
|
||||
SearchParameters searchParameters = new SearchParameters();
|
||||
searchParameters.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||
searchParameters.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
||||
searchParameters.setQuery(query);
|
||||
ResultSet resultSet = this.searchService.query(searchParameters);
|
||||
try
|
||||
{
|
||||
if (lowFirstName.indexOf(nameFilters[i]) != -1)
|
||||
if (resultSet.length() != 0)
|
||||
{
|
||||
addUser = true;
|
||||
break;
|
||||
}
|
||||
else if (lowLastName.indexOf(nameFilters[i]) != -1)
|
||||
{
|
||||
addUser = true;
|
||||
break;
|
||||
ResultSetRow row = resultSet.getRow(0);
|
||||
Map<String, Serializable> values = row.getValues();
|
||||
String firstName = (String)values.get(ContentModel.PROP_FIRSTNAME.toString());
|
||||
String lastName = (String)values.get(ContentModel.PROP_LASTNAME.toString());
|
||||
|
||||
final String lowFirstName = (firstName != null ? firstName.toLowerCase() : "");
|
||||
final String lowLastName = (lastName != null ? lastName.toLowerCase() : "");
|
||||
for (int i=0; i<nameFilters.length; i++)
|
||||
{
|
||||
if (lowFirstName.indexOf(nameFilters[i]) != -1)
|
||||
{
|
||||
addUser = true;
|
||||
break;
|
||||
}
|
||||
else if (lowLastName.indexOf(nameFilters[i]) != -1)
|
||||
{
|
||||
addUser = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
resultSet.close();
|
||||
}
|
||||
|
||||
return addUser;
|
||||
}
|
||||
|
Reference in New Issue
Block a user