mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
93983: Merged 5.0.N (5.0.1) to HEAD-BUG-FIX (5.1/Cloud) 93851: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.1) 93802: Fix for MNT-13198 BM-0012: Run v420b1494_01: (CMIS) GetSites is Slow - use hasSite to check for existence and fix person lookup case sensitivity configuration git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95023 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1212,7 +1212,10 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
||||
final Set<String> siteNames = new TreeSet<String>();
|
||||
|
||||
// MNT-13198 - use the bridge table
|
||||
Set<String> containingAuthorities = authorityService.getContainingAuthorities(AuthorityType.GROUP, userName, false);
|
||||
String actualUserName = personService.getUserIdentifier(userName);
|
||||
if(actualUserName != null)
|
||||
{
|
||||
Set<String> containingAuthorities = authorityService.getContainingAuthorities(AuthorityType.GROUP, actualUserName, false);
|
||||
for(String authority : containingAuthorities)
|
||||
{
|
||||
if (siteNames.size() < maxResults)
|
||||
@@ -1220,13 +1223,13 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
||||
String siteName = resolveSite(authority);
|
||||
// MNT-10836 fix, after MNT-10109 we should also check site existence
|
||||
// A simple exists check would be better than getting the site properties etc - profiling suggests x2 faster
|
||||
if ((siteName != null) && (getSite(siteName) != null))
|
||||
if ((siteName != null) && hasSite(siteName))
|
||||
{
|
||||
siteNames.add(siteName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (siteNames.isEmpty())
|
||||
{
|
||||
return Collections.emptyList();
|
||||
|
Reference in New Issue
Block a user