mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4145 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4146 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4159 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4160 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4164 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4165 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4165 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4166 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4176 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4178 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4179 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4181 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4145 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4146 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4630 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -520,7 +520,7 @@ public class ArchiveAndRestoreTest extends TestCase
|
||||
|
||||
public void testInTransactionRestore() throws Exception
|
||||
{
|
||||
RestoreNodeReport report = nodeArchiveService.restoreArchivedNode(a);
|
||||
RestoreNodeReport report = nodeArchiveService.restoreArchivedNode(a_);
|
||||
// expect a failure due to missing archive node
|
||||
assertEquals("Expected failure", RestoreStatus.FAILURE_INVALID_ARCHIVE_NODE, report.getStatus());
|
||||
// check that our transaction was not affected
|
||||
@@ -529,10 +529,8 @@ public class ArchiveAndRestoreTest extends TestCase
|
||||
|
||||
public void testInTransactionPurge() throws Exception
|
||||
{
|
||||
nodeArchiveService.purgeArchivedNode(a);
|
||||
nodeArchiveService.purgeArchivedNode(a_);
|
||||
// the node should still be there (it was not available to the purge transaction)
|
||||
assertTrue("Node should not have been touched", nodeService.exists(a));
|
||||
// check that our transaction was not affected
|
||||
assertEquals("Transaction should still be valid", Status.STATUS_ACTIVE, txn.getStatus());
|
||||
}
|
||||
|
||||
@@ -617,6 +615,8 @@ public class ArchiveAndRestoreTest extends TestCase
|
||||
*/
|
||||
public void testPermissionsForRestore() throws Exception
|
||||
{
|
||||
|
||||
|
||||
// user A deletes 'a'
|
||||
authenticationService.authenticate(USER_A, USER_A.toCharArray());
|
||||
nodeService.deleteNode(a);
|
||||
@@ -624,6 +624,7 @@ public class ArchiveAndRestoreTest extends TestCase
|
||||
authenticationService.authenticate(USER_B, USER_B.toCharArray());
|
||||
nodeService.deleteNode(b);
|
||||
|
||||
commitAndBeginNewTransaction();
|
||||
// user B can't see archived 'a'
|
||||
List<RestoreNodeReport> restoredByB = nodeArchiveService.restoreAllArchivedNodes(workStoreRef);
|
||||
assertEquals("User B should be able to see only B's delete", 1, restoredByB.size());
|
||||
|
@@ -446,10 +446,8 @@ public abstract class AbstractReindexComponent implements IndexRecovery
|
||||
}
|
||||
else // node created
|
||||
{
|
||||
// get the primary assoc for the node
|
||||
ChildAssociationRef primaryAssocRef = nodeService.getPrimaryParent(nodeRef);
|
||||
// reindex
|
||||
indexer.createNode(primaryAssocRef);
|
||||
indexer.updateNode(nodeRef);
|
||||
}
|
||||
}
|
||||
// done
|
||||
|
Reference in New Issue
Block a user