diff --git a/source/java/org/alfresco/repo/site/script/ScriptSiteService.java b/source/java/org/alfresco/repo/site/script/ScriptSiteService.java index 281b6f4ba1..95e9d2ec21 100644 --- a/source/java/org/alfresco/repo/site/script/ScriptSiteService.java +++ b/source/java/org/alfresco/repo/site/script/ScriptSiteService.java @@ -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() - { - 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 * preset.