Automatically enable the multi-tenant share mapper if the tenant service is enabled, and the share mapper has not

been enabled via the XML config.
Removed a couple of unused imports from the MultiTenantShareMapper class.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7985 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2008-01-11 13:56:37 +00:00
parent 8957cdf2e0
commit 74c791018d
2 changed files with 12 additions and 2 deletions

View File

@@ -79,6 +79,7 @@ import org.alfresco.config.Config;
import org.alfresco.config.ConfigElement;
import org.alfresco.config.ConfigLookupContext;
import org.alfresco.config.ConfigService;
import org.alfresco.config.element.GenericConfigElement;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.filesys.alfresco.AlfrescoClientInfoFactory;
import org.alfresco.filesys.alfresco.DesktopAction;
@@ -2301,6 +2302,17 @@ public class ServerConfigurationBean extends ServerConfiguration implements Appl
secConfig.setShareMapper(mapperClass, mapperElem);
}
else
{
// Check if the tenant service is enabled
if ( m_tenantService != null && m_tenantService.isEnabled())
{
// Initialize the multi-tenancy share mapper
secConfig.setShareMapper("org.alfresco.filesys.alfresco.MultiTenantShareMapper", new GenericConfigElement("shareMapper"));
}
}
// Check if any domain mappings have been specified