ALF-10271: Test disabled: ArchiveAndRestoreTest.testAR7889ArchiveAndRestoreMustNotModifyAuditable

- Added required checks for behaviour activation


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30640 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-09-20 12:47:34 +00:00
parent ff5693740c
commit d8b5f09911
2 changed files with 8 additions and 1 deletions

View File

@@ -761,7 +761,7 @@ public class ArchiveAndRestoreTest extends TestCase
/** /**
* <a href="https://issues.alfresco.com/jira/browse/ALF-7889">ALF-7889</a> * <a href="https://issues.alfresco.com/jira/browse/ALF-7889">ALF-7889</a>
*/ */
public synchronized void DISABLED_testAR7889ArchiveAndRestoreMustNotModifyAuditable() throws Exception public synchronized void testAR7889ArchiveAndRestoreMustNotModifyAuditable() throws Exception
{ {
AuthenticationUtil.setFullyAuthenticatedUser(USER_A); AuthenticationUtil.setFullyAuthenticatedUser(USER_A);
nodeService.addAspect(b, ContentModel.ASPECT_AUDITABLE, null); nodeService.addAspect(b, ContentModel.ASPECT_AUDITABLE, null);

View File

@@ -2543,6 +2543,13 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
} }
// The dictionary says propagate. Now get the parent node and prompt the touch. // The dictionary says propagate. Now get the parent node and prompt the touch.
NodeRef parentNodeRef = assocRef.getParentRef(); NodeRef parentNodeRef = assocRef.getParentRef();
// Do not propagate if the cm:auditable behaviour is off
if (!policyBehaviourFilter.isEnabled(parentNodeRef, ContentModel.ASPECT_AUDITABLE))
{
return;
}
Pair<Long, NodeRef> parentNodePair = getNodePairNotNull(parentNodeRef); Pair<Long, NodeRef> parentNodePair = getNodePairNotNull(parentNodeRef);
Long parentNodeId = parentNodePair.getFirst(); Long parentNodeId = parentNodePair.getFirst();
// If we have already modified a particular parent node in the current txn, // If we have already modified a particular parent node in the current txn,