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 21bb599e20
commit cd09266213
74 changed files with 870 additions and 997 deletions

View File

@@ -88,7 +88,7 @@ public class UserUsageTrackingComponentTest extends TestCase
userUsageTrackingComponent = (UserUsageTrackingComponent)applicationContext.getBean("userUsageTrackingComponent");
AuthenticationUtil.setSystemUserAsCurrentUser();
AuthenticationUtil.setRunAsUserSystem();
createUsersAndContent();
}
@@ -147,13 +147,13 @@ public class UserUsageTrackingComponentTest extends TestCase
sb.append(k);
}
AuthenticationUtil.setCurrentUser(userName);
AuthenticationUtil.setFullyAuthenticatedUser(userName);
addTextContent(homeFolder, "a-"+userName+".txt", sb.toString());
addTextContent(homeFolder, "b-"+userName+".txt", sb.toString());
}
AuthenticationUtil.setSystemUserAsCurrentUser();
AuthenticationUtil.setRunAsUserSystem();
if ((count == BATCH_SIZE) || (i == MAX_USERS))
{
@@ -205,7 +205,7 @@ public class UserUsageTrackingComponentTest extends TestCase
NodeRef homeFolder = getHomeSpaceFolderNode(userName);
AuthenticationUtil.setCurrentUser(userName);
AuthenticationUtil.setFullyAuthenticatedUser(userName);
StringBuilder sb = new StringBuilder();
for (int j = 1; j <= i; j++)
@@ -217,7 +217,7 @@ public class UserUsageTrackingComponentTest extends TestCase
addTextContent(homeFolder, "c-"+userName+".txt", sb.toString());
addTextContent(homeFolder, "d-"+userName+".txt", sb.toString());
AuthenticationUtil.setSystemUserAsCurrentUser();
AuthenticationUtil.setRunAsUserSystem();
}
System.out.println("Added content");
@@ -237,7 +237,7 @@ public class UserUsageTrackingComponentTest extends TestCase
NodeRef homeFolder = getHomeSpaceFolderNode(userName);
AuthenticationUtil.setCurrentUser(userName);
AuthenticationUtil.setFullyAuthenticatedUser(userName);
NodeRef childNodeRef = nodeService.getChildByName(homeFolder, ContentModel.ASSOC_CONTAINS, "a-"+userName+".txt");
nodeService.deleteNode(childNodeRef);
@@ -245,7 +245,7 @@ public class UserUsageTrackingComponentTest extends TestCase
childNodeRef = nodeService.getChildByName(homeFolder, ContentModel.ASSOC_CONTAINS, "b-"+userName+".txt");
nodeService.deleteNode(childNodeRef);
AuthenticationUtil.setSystemUserAsCurrentUser();
AuthenticationUtil.setRunAsUserSystem();
}
System.out.println("Deleted content");