MT - fix to allow System to access disabled tenants

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8505 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-03-11 11:38:02 +00:00
parent b758378921
commit dc9c207c88

View File

@@ -535,9 +535,13 @@ public class MultiTServiceImpl implements TenantService
protected void checkTenantEnabled(String tenantDomain) protected void checkTenantEnabled(String tenantDomain)
{ {
if (getTenant(tenantDomain).isEnabled() == false) // note: System user can access disabled tenants
if (! getBaseNameUser(AuthenticationUtil.getCurrentUserName()).equals(AuthenticationUtil.getSystemUserName()))
{ {
throw new AlfrescoRuntimeException("Tenant is not enabled: " + tenantDomain); if (getTenant(tenantDomain).isEnabled() == false)
{
throw new AlfrescoRuntimeException("Tenant is not enabled: " + tenantDomain);
}
} }
} }