mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD:
41618: MT: ALF-14354 - Repository.getRootHome() is not tenant-safe !! git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@41620 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1280,6 +1280,41 @@ public class MultiTDemoTest extends TestCase
|
||||
}, tenantAdminName);
|
||||
}
|
||||
|
||||
public void test_ALF_14354()
|
||||
{
|
||||
final String tenantDomain1 = TEST_RUN+".one.alf14354";
|
||||
final String tenantDomain2 = TEST_RUN+".two.alf14354";
|
||||
|
||||
createTenant(tenantDomain1);
|
||||
createTenant(tenantDomain2);
|
||||
|
||||
String tenantAdminName = tenantService.getDomainUser(AuthenticationUtil.getAdminUserName(), tenantDomain1);
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
NodeRef rootNodeRef = repositoryHelper.getRootHome();
|
||||
|
||||
assertTrue(nodeService.exists(rootNodeRef));
|
||||
|
||||
return null;
|
||||
}
|
||||
}, tenantAdminName);
|
||||
|
||||
tenantAdminName = tenantService.getDomainUser(AuthenticationUtil.getAdminUserName(), tenantDomain2);
|
||||
AuthenticationUtil.runAs(new RunAsWork<Object>()
|
||||
{
|
||||
public Object doWork() throws Exception
|
||||
{
|
||||
NodeRef rootNodeRef = repositoryHelper.getRootHome();
|
||||
|
||||
assertTrue(nodeService.exists(rootNodeRef));
|
||||
|
||||
return null;
|
||||
}
|
||||
}, tenantAdminName);
|
||||
}
|
||||
|
||||
private void createGroup(String shortName, String parentShortName)
|
||||
{
|
||||
// create new Group using authority Service
|
||||
|
Reference in New Issue
Block a user