mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
An attempt to fix build failure in Bamboo which appeared by r120912.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@120953 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -411,23 +411,31 @@ public class MultiTDemoTest extends TestCase
|
|||||||
private void createTestAuthoritiesForTenant(final String[] uniqueGroupNames, final String userName)
|
private void createTestAuthoritiesForTenant(final String[] uniqueGroupNames, final String userName)
|
||||||
{
|
{
|
||||||
String tenantDomain = tenantService.getUserDomain(userName);
|
String tenantDomain = tenantService.getUserDomain(userName);
|
||||||
|
|
||||||
// Create groups for tenant
|
// Create groups for tenant
|
||||||
TenantUtil.runAsUserTenant(new TenantRunAsWork<Object>()
|
TenantUtil.runAsUserTenant(new TenantRunAsWork<Void>()
|
||||||
{
|
{
|
||||||
public Object doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
// find person
|
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback<Void>()
|
||||||
NodeRef personNodeRef = personService.getPerson(userName);
|
|
||||||
NodeRef homeSpaceRef = (NodeRef)nodeService.getProperty(personNodeRef, ContentModel.PROP_HOMEFOLDER);
|
|
||||||
assertNotNull(homeSpaceRef);
|
|
||||||
|
|
||||||
for (int i = 0; i < uniqueGroupNames.length; i++)
|
|
||||||
{
|
{
|
||||||
authorityService.createAuthority(AuthorityType.GROUP, uniqueGroupNames[i]);
|
@Override
|
||||||
permissionService.setPermission(homeSpaceRef, "GROUP_" + uniqueGroupNames[i], "Consumer", true);
|
public Void execute() throws Throwable
|
||||||
}
|
{
|
||||||
|
// find person
|
||||||
|
NodeRef personNodeRef = personService.getPerson(userName);
|
||||||
|
NodeRef homeSpaceRef = (NodeRef) nodeService.getProperty(personNodeRef, ContentModel.PROP_HOMEFOLDER);
|
||||||
|
assertNotNull(homeSpaceRef);
|
||||||
|
|
||||||
|
for (int i = 0; i < uniqueGroupNames.length; i++)
|
||||||
|
{
|
||||||
|
authorityService.createAuthority(AuthorityType.GROUP, uniqueGroupNames[i]);
|
||||||
|
permissionService.setPermission(homeSpaceRef, "GROUP_" + uniqueGroupNames[i], "Consumer", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, userName, tenantDomain);
|
}, userName, tenantDomain);
|
||||||
|
Reference in New Issue
Block a user