mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-11722: Error fails when try to log in as disable tenant
* Added DisabledTenantException error * Changed ExceptionTranslatiorMethodInterceptor to translated the above exception into an AuthenticationException git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32353 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
*/
|
||||
package org.alfresco.repo.security.permissions.impl;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.repo.tenant.TenantDisabledException;
|
||||
import org.alfresco.service.transaction.ReadOnlyServerException;
|
||||
import org.aopalliance.intercept.MethodInterceptor;
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
@@ -61,5 +63,10 @@ public class ExceptionTranslatorMethodInterceptor implements MethodInterceptor
|
||||
// this usually occurs when the server is in read-only mode
|
||||
throw new AccessDeniedException(ReadOnlyServerException.MSG_READ_ONLY, e);
|
||||
}
|
||||
catch (TenantDisabledException e)
|
||||
{
|
||||
// the cause already has an I18Nd message
|
||||
throw new AuthenticationException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -671,7 +671,7 @@ public class MultiTServiceImpl implements TenantService
|
||||
// note: System user can access disabled tenants
|
||||
if (!AuthenticationUtil.isRunAsUserTheSystemUser() && !(getTenant(tenantDomain).isEnabled()))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Tenant is not enabled: " + tenantDomain);
|
||||
throw new TenantDisabledException(tenantDomain);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user