mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES\DEV\AUTH_BRIDGE to HEAD
43735: Final part of ALF-14861 SOLR to scale for non-admin users in 100k sites and a subgroup of each of 1000 independent groupings with 1000 subgroups git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@44243 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1036,22 +1036,20 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
||||
private List<SiteInfo> listSitesImpl(final String userName, int size)
|
||||
{
|
||||
final int maxResults = size > 0 ? size : 1000;
|
||||
Set<String> containingAuthorities = authorityService.getContainingAuthorities(AuthorityType.GROUP, userName, false);
|
||||
final Set<String> siteNames = new TreeSet<String>();
|
||||
authorityService.getContainingAuthoritiesInZone(AuthorityType.GROUP, userName, AuthorityService.ZONE_APP_SHARE, new AuthorityFilter(){
|
||||
@Override
|
||||
public boolean includeAuthority(String authority)
|
||||
for(String authority : containingAuthorities)
|
||||
{
|
||||
if (siteNames.size() < maxResults)
|
||||
{
|
||||
if (siteNames.size() < maxResults)
|
||||
String siteName = resolveSite(authority);
|
||||
if (siteName != null)
|
||||
{
|
||||
String siteName = resolveSite(authority);
|
||||
if (siteName == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return siteNames.add(siteName);
|
||||
siteNames.add(siteName);
|
||||
}
|
||||
return false;
|
||||
}}, maxResults);
|
||||
}
|
||||
}
|
||||
|
||||
if (siteNames.isEmpty())
|
||||
{
|
||||
return Collections.emptyList();
|
||||
|
Reference in New Issue
Block a user