PublishingQueue.scheduleNewEvent() now includes a permission check to ensure user has 'Add CHild' access to the relevant Channels.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29440 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-07-28 16:15:42 +00:00
parent b27eed65e6
commit 874a165cbb
9 changed files with 162 additions and 47 deletions

View File

@@ -62,8 +62,6 @@ public abstract class AbstractPublishingIntegrationTest extends BaseSpringTest
protected Environment environment;
protected NodeRef docLib;
protected UserTransaction transaction;
@Override
@Before
public void onSetUp() throws Exception
@@ -76,10 +74,6 @@ public abstract class AbstractPublishingIntegrationTest extends BaseSpringTest
this.fileFolderService = serviceRegistry.getFileFolderService();
this.nodeService = serviceRegistry.getNodeService();
transaction = serviceRegistry.getTransactionService().getUserTransaction();
transaction.begin();
transaction.setRollbackOnly();
this.siteId = GUID.generate();
siteService.createSite("test", siteId,
"Site created by publishing test",
@@ -89,30 +83,21 @@ public abstract class AbstractPublishingIntegrationTest extends BaseSpringTest
this.environment = rootObject.getEnvironment();
this.queue = rootObject.getPublishingQueue();
AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser();
}
@After
public void onTearDown() throws Exception
{
AuthenticationUtil.setAdminUserAsFullyAuthenticatedUser();
siteService.deleteSite(siteId);
try
{
if (transaction.getStatus() == Status.STATUS_MARKED_ROLLBACK)
{
transaction.rollback();
}
else
{
transaction.commit();
}
siteService.deleteSite(siteId);
}
catch (Exception e)
finally
{
e.printStackTrace();
throw new RuntimeException(e);
super.onTearDown();
}
super.onTearDown();
}
protected ChannelType mockChannelType()