Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

77354: build fix following merge from PLATFORM1


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78142 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-23 19:00:14 +00:00
parent e10bbbcecb
commit ce8f3258c6
2 changed files with 36 additions and 38 deletions

View File

@@ -2228,9 +2228,9 @@ public class CMISTest
AccessControlEntryImpl ace = new AccessControlEntryImpl();
ace.setPrincipal(new AccessControlPrincipalDataImpl(testGroup));
List<String> putPermissions = new ArrayList<String>();
putPermissions.add(CMISAccessControlService.CMIS_ALL_PERMISSION);
putPermissions.add(CMISAccessControlService.CMIS_READ_PERMISSION);
putPermissions.add(CMISAccessControlService.CMIS_WRITE_PERMISSION);
putPermissions.add(BasicPermissions.ALL);
putPermissions.add(BasicPermissions.READ);
putPermissions.add(BasicPermissions.WRITE);
ace.setPermissions(putPermissions);
ace.setDirect(true);
acesList.add(ace);
@@ -2266,6 +2266,38 @@ public class CMISTest
AuthenticationUtil.popAuthentication();
}
}
@Test
public void dictionaryTest()
{
TenantUtil.runAsUserTenant(new TenantRunAsWork<Void>()
{
@Override
public Void doWork() throws Exception
{
M2Model customModel = M2Model.createModel(
Thread.currentThread().getContextClassLoader().
getResourceAsStream("dictionary/dictionarydaotest_model1.xml"));
dictionaryDAO.putModel(customModel);
assertNotNull(cmisDictionaryService.findType("P:cm:dublincore"));
TypeDefinitionWrapper td = cmisDictionaryService.findType("D:daotest1:type1");
assertNotNull(td);
return null;
}
}, "user1", "tenant1");
TenantUtil.runAsUserTenant(new TenantRunAsWork<Void>()
{
@Override
public Void doWork() throws Exception
{
assertNotNull(cmisDictionaryService.findType("P:cm:dublincore"));
TypeDefinitionWrapper td = cmisDictionaryService.findType("D:daotest1:type1");
assertNull(td);
return null;
}
}, "user2", "tenant2");
}
/**
* MNT-11304: Test that Alfresco has no default boundaries for decimals
@@ -2325,37 +2357,4 @@ public class CMISTest
AuthenticationUtil.popAuthentication();
}
}
@Test
public void dictionaryTest()
{
TenantUtil.runAsUserTenant(new TenantRunAsWork<Void>()
{
@Override
public Void doWork() throws Exception
{
M2Model customModel = M2Model.createModel(
Thread.currentThread().getContextClassLoader().
getResourceAsStream("dictionary/dictionarydaotest_model1.xml"));
dictionaryDAO.putModel(customModel);
assertNotNull(cmisDictionaryService.findType("P:cm:dublincore"));
TypeDefinitionWrapper td = cmisDictionaryService.findType("D:daotest1:type1");
assertNotNull(td);
return null;
}
}, "user1", "tenant1");
TenantUtil.runAsUserTenant(new TenantRunAsWork<Void>()
{
@Override
public Void doWork() throws Exception
{
assertNotNull(cmisDictionaryService.findType("P:cm:dublincore"));
TypeDefinitionWrapper td = cmisDictionaryService.findType("D:daotest1:type1");
assertNull(td);
return null;
}
}, "user2", "tenant2");
}
}
}