Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD:

41642: MT: fix unit test/build (ALF-12732)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@41643 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2012-09-17 08:44:22 +00:00
parent 2b8870c772
commit 2a30f9b22f

View File

@@ -1257,6 +1257,11 @@ public class MultiTDemoTest extends TestCase
createTenant(tenantDomain1);
String tenantAdminName = tenantService.getDomainUser(AuthenticationUtil.getAdminUserName(), tenantDomain1);
try
{
AuthenticationUtil.setFullyAuthenticatedUser(tenantAdminName); // note: since SiteServiceImpl.setupSitePermissions currently uses getCurrentUserName (rather than runAs)
AuthenticationUtil.runAs(new RunAsWork<Object>()
{
public Object doWork() throws Exception
@@ -1279,6 +1284,11 @@ public class MultiTDemoTest extends TestCase
}
}, tenantAdminName);
}
finally
{
AuthenticationUtil.clearCurrentSecurityContext();
}
}
public void test_ALF_14354()
{