mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-06-30 18:15:39 +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:
parent
a028484138
commit
c6f4ac8b57
@ -48,6 +48,7 @@ system.locks.err.excl_lock_exists=Failed to get lock ''{0}'' using token ''{1}''
|
||||
|
||||
# Multi-Tenant
|
||||
system.mt.warn.upgrade_mt_admin_context=Please update your alfresco/extension/mt/mt-admin-context.xml (to use latest alfresco/extension/mt/mt-admin-context.xml.sample).
|
||||
system.mt.disabled=Tenant is disabled: {0}
|
||||
|
||||
# Usages
|
||||
system.usage.err.no_txn=RepoUsageComponent must be called in a transaction.
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user