MT - initial checkin for MT-enabled Web Scripts

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8293 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-02-15 15:29:27 +00:00
parent 0eaa1f5ba9
commit 213f696b97

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2007 Alfresco Software Limited.
* Copyright (C) 2005-2008 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -69,6 +69,11 @@ public abstract class AuthenticationUtil
}
}
public static boolean isMtEnabled()
{
return AuthenticationUtil.mtEnabled;
}
public static Authentication setCurrentUser(String userName)
{
return setCurrentUser(userName, getDefaultUserDetails(userName));
@@ -188,7 +193,7 @@ public abstract class AuthenticationUtil
{
NDC.remove();
if (mtEnabled == true)
if (isMtEnabled())
{
int idx = userName.indexOf(TenantService.SEPARATOR);
if ((idx != -1) && (idx < (userName.length()-1)))
@@ -313,7 +318,7 @@ public abstract class AuthenticationUtil
R result = null;
try
{
if ((currentUser != null) && (mtEnabled == true))
if ((currentUser != null) && (isMtEnabled()))
{
int idx = currentUser.indexOf(TenantService.SEPARATOR);
if ((idx != -1) && (idx < (currentUser.length()-1)))