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

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