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:
Jan Vonka
2008-12-19 12:15:59 +00:00
parent 4fe9a4f345
commit 3ab0ccf0df
14 changed files with 53 additions and 35 deletions

View File

@@ -103,7 +103,7 @@ public class SiteFeedRetrieverWebScript extends DeclarativeWebScript
SiteInfo siteInfo = siteService.getSite(siteId);
if (siteInfo == null)
{
String currentUser = AuthenticationUtil.getCurrentUserName();
String currentUser = AuthenticationUtil.getFullyAuthenticatedUser();
status.setCode(Status.STATUS_UNAUTHORIZED);
logger.warn("Unable to get site feed entries for '" + siteId + "' (site does not exist or is private) - currently logged in as '" + currentUser +"'");

View File

@@ -30,7 +30,6 @@ import java.util.List;
import java.util.Map;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.activities.ActivityService;
import org.alfresco.service.cmr.security.AuthorityService;
@@ -95,10 +94,10 @@ public class UserFeedRetrieverWebScript extends DeclarativeWebScript
if ((feedUserId == null) || (feedUserId.length() == 0))
{
feedUserId = AuthenticationUtil.getCurrentUserName();
feedUserId = AuthenticationUtil.getFullyAuthenticatedUser();
}
String currentUser = AuthenticationUtil.getCurrentUserName();
String currentUser = AuthenticationUtil.getFullyAuthenticatedUser();
if (! ((currentUser == null) ||
(currentUser.equals(AuthenticationUtil.getSystemUserName())) ||
(authorityService.isAdminAuthority(currentUser)) ||