mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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)))
|
||||
|
Reference in New Issue
Block a user