mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
12145: Merged V2.2 to V3.0 (AuthenticationUtil) 12109: AuthenticationUtil and AuthenticationComponent refactor 12152: Removed Lucene usage from lookup of 'sites' root folder 12153: Fix InviteServiceTest by cleaning up leaking authentications 12159: Fix for broken usage pattern of the Threadlocal values in recent AuthenticationUtil refactor. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12508 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -105,11 +105,7 @@ public class MultiTNodeServiceInterceptor extends DelegatingIntroductionIntercep
|
||||
public Object invoke(MethodInvocation invocation) throws Throwable
|
||||
{
|
||||
// See if we can shortcut
|
||||
if (EqualsHelper.nullSafeEquals(
|
||||
AuthenticationUtil.SYSTEM_USER_NAME,
|
||||
AuthenticationUtil.getCurrentEffectiveUserName())
|
||||
||
|
||||
!AuthenticationUtil.isMtEnabled())
|
||||
if (AuthenticationUtil.isRunAsUserTheSystemUser() || !AuthenticationUtil.isMtEnabled())
|
||||
{
|
||||
return invocation.proceed();
|
||||
}
|
||||
@@ -232,11 +228,9 @@ public class MultiTNodeServiceInterceptor extends DelegatingIntroductionIntercep
|
||||
{
|
||||
if (tenantService.isEnabled())
|
||||
{
|
||||
String currentUser = AuthenticationUtil.getCurrentEffectiveUserName();
|
||||
|
||||
// MT: return tenant stores only (although for super System return all stores - as used by
|
||||
// ConfigurationChecker, IndexRecovery, IndexBackup etc)
|
||||
if ((currentUser == null) || (!currentUser.equals(AuthenticationUtil.getSystemUserName())))
|
||||
if (!AuthenticationUtil.isRunAsUserTheSystemUser())
|
||||
{
|
||||
tenantService.checkDomain(storeRef.getIdentifier());
|
||||
storeRef = tenantService.getBaseName(storeRef);
|
||||
|
Reference in New Issue
Block a user