Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

64446: Merged WAT1 (4.3/Cloud) to HEAD-BUG-FIX (4.3/Cloud)
      63151: Reverted most of the ACE-493 implementation, committed in r62555, as a new Get sites webscript for the site admins, implemented in r63040. Also, modified the existing tests for the Get sites webscript.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@64592 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2014-03-15 07:09:44 +00:00
parent fd031bcee8
commit 8d813889b4

View File

@@ -202,39 +202,6 @@ public class ScriptSiteService extends BaseScopableProcessorExtension
} }
} }
/**
* Retrieves the sites available in the repository based on the user's access right. For example,
* Site Administrator can access all the sites (Public, MODERATED and PRIVATE). The returned list can optionally
* be filtered by name and site preset. If no filters are specified then all the available sites are returned.
*
* NOTE: If the filter starts with a * a Lucene based search will be performed, this may discover a wider range
* of results i.e. those sites that contain the search term as opposed to those that start with the search term,
* but newly created sites may not be found until the underlying search indexes are updated.
*
* @param filter inclusion filter for returned sites. Only sites whose cm:name OR cm:title
* OR cm:description start with the filter string will be returned.
* @param sitePresetFilter site preset filter
* @param size max results size crop if >0
* @return Site[] a list of the site filtered as appropriate
*/
public Site[] getSitesAsSiteAdmin(final String filter, final String sitePresetFilter, final int size)
{
if (siteService.isSiteAdmin(AuthenticationUtil.getFullyAuthenticatedUser()))
{
return AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork<Site[]>()
{
public Site[] doWork() throws Exception
{
return getSites(filter, sitePresetFilter, size);
}
}, AuthenticationUtil.getAdminUserName());
}
else
{
return getSites(filter, sitePresetFilter, size);
}
}
/** /**
* List the sites available in the repository. The returned list can optionally be filtered by name and site * List the sites available in the repository. The returned list can optionally be filtered by name and site
* preset. * preset.