mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix to issue where if used is a member of more than 1000 sites it is possible to cause listSites (for a user) to pass too many results to the NodeService API (which has a fixed maximum limit of 1000 entries)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31083 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1001,6 +1001,8 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
|||||||
authorityService.getContainingAuthoritiesInZone(AuthorityType.GROUP, userName, AuthorityService.ZONE_APP_SHARE, new AuthorityFilter(){
|
authorityService.getContainingAuthoritiesInZone(AuthorityType.GROUP, userName, AuthorityService.ZONE_APP_SHARE, new AuthorityFilter(){
|
||||||
@Override
|
@Override
|
||||||
public boolean includeAuthority(String authority)
|
public boolean includeAuthority(String authority)
|
||||||
|
{
|
||||||
|
if (siteNames.size() < maxResults)
|
||||||
{
|
{
|
||||||
String siteName = resolveSite(authority);
|
String siteName = resolveSite(authority);
|
||||||
if (siteName == null)
|
if (siteName == null)
|
||||||
@@ -1008,6 +1010,8 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return siteNames.add(siteName);
|
return siteNames.add(siteName);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}}, maxResults);
|
}}, maxResults);
|
||||||
if (siteNames.isEmpty())
|
if (siteNames.isEmpty())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user