mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge remote-tracking branch 'remotes/origin/master' into feature/RM-7006_UpdateToACS611
This commit is contained in:
@@ -92,7 +92,7 @@ public class AddToHoldsTests extends BaseRMRestTest
|
|||||||
"permissions to perform this operation.";
|
"permissions to perform this operation.";
|
||||||
private static final String INVALID_TYPE_ERROR_MESSAGE = "Items added to a hold must be either a record, a " +
|
private static final String INVALID_TYPE_ERROR_MESSAGE = "Items added to a hold must be either a record, a " +
|
||||||
"record folder or active content.";
|
"record folder or active content.";
|
||||||
private static final String LOCKED_FILE_ERROR_MESSAGE = "Locked nodes can't be added to hold";
|
private static final String LOCKED_FILE_ERROR_MESSAGE = "Locked content can't be added to a hold.";
|
||||||
private SiteModel testSite;
|
private SiteModel testSite;
|
||||||
private String holdNodeRef;
|
private String holdNodeRef;
|
||||||
private FileModel documentHeld, contentToAddToHold, contentAddToHoldNoPermission;
|
private FileModel documentHeld, contentToAddToHold, contentAddToHoldNoPermission;
|
||||||
|
@@ -143,7 +143,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
|||||||
|
|
||||||
STEP("Check the request failed.");
|
STEP("Check the request failed.");
|
||||||
restClient.assertStatusCodeIs(FORBIDDEN);
|
restClient.assertStatusCodeIs(FORBIDDEN);
|
||||||
restClient.assertLastError().containsSummary("Frozen nodes can not be updated.");
|
restClient.assertLastError().containsSummary("Frozen content can't be updated.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -160,7 +160,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
|||||||
|
|
||||||
STEP("Check the request failed.");
|
STEP("Check the request failed.");
|
||||||
restClient.assertStatusCodeIs(FORBIDDEN);
|
restClient.assertStatusCodeIs(FORBIDDEN);
|
||||||
restClient.assertLastError().containsSummary("Frozen nodes can not be updated.");
|
restClient.assertLastError().containsSummary("Frozen content can't be updated.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -176,7 +176,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
|||||||
|
|
||||||
STEP("Check the request failed.");
|
STEP("Check the request failed.");
|
||||||
restClient.assertStatusCodeIs(FORBIDDEN);
|
restClient.assertStatusCodeIs(FORBIDDEN);
|
||||||
restClient.assertLastError().containsSummary("Frozen nodes can not be deleted.");
|
restClient.assertLastError().containsSummary("Frozen content can't be deleted.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -186,7 +186,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
@AlfrescoTest(jira = "RM-6924")
|
@AlfrescoTest(jira = "RM-6924")
|
||||||
public void copyFrozenFile() throws Exception
|
public void copyFrozenFile()
|
||||||
{
|
{
|
||||||
STEP("Copy frozen file");
|
STEP("Copy frozen file");
|
||||||
String postBody = JsonBodyGenerator.keyValueJson("targetParentId",folderModel.getNodeRef());
|
String postBody = JsonBodyGenerator.keyValueJson("targetParentId",folderModel.getNodeRef());
|
||||||
@@ -211,7 +211,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
|||||||
|
|
||||||
STEP("Check the request failed.");
|
STEP("Check the request failed.");
|
||||||
assertStatusCode(FORBIDDEN);
|
assertStatusCode(FORBIDDEN);
|
||||||
getRestAPIFactory().getRmRestWrapper().assertLastError().containsSummary("Frozen nodes can not be moved.");
|
getRestAPIFactory().getRmRestWrapper().assertLastError().containsSummary("Frozen content can't be moved.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -219,12 +219,10 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
|||||||
* When I update the record folder and make the records as vital
|
* When I update the record folder and make the records as vital
|
||||||
* Then I am successful and the records not held are marked as vital
|
* Then I am successful and the records not held are marked as vital
|
||||||
* And the frozen nodes have the vital record search properties updated
|
* And the frozen nodes have the vital record search properties updated
|
||||||
*
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
@AlfrescoTest (jira = "RM-6929")
|
@AlfrescoTest (jira = "RM-6929")
|
||||||
public void updateRecordFolderVitalProperties() throws Exception
|
public void updateRecordFolderVitalProperties()
|
||||||
{
|
{
|
||||||
STEP("Update the vital record properties for the record folder");
|
STEP("Update the vital record properties for the record folder");
|
||||||
// Create the record folder properties to update
|
// Create the record folder properties to update
|
||||||
@@ -322,7 +320,7 @@ public class PreventActionsOnFrozenContentTests extends BaseRMRestTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass (alwaysRun = true)
|
@AfterClass (alwaysRun = true)
|
||||||
public void cleanUpPreventActionsOnFrozenContent() throws Exception
|
public void cleanUpPreventActionsOnFrozenContent()
|
||||||
{
|
{
|
||||||
holdsAPI.deleteHold(getAdminUser().getUsername(), getAdminUser().getPassword(), HOLD_ONE);
|
holdsAPI.deleteHold(getAdminUser().getUsername(), getAdminUser().getPassword(), HOLD_ONE);
|
||||||
dataSite.usingAdmin().deleteSite(testSite);
|
dataSite.usingAdmin().deleteSite(testSite);
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
rm.hold.not-hold=The node {0} is not a hold.
|
rm.hold.not-hold={0} is not a hold.
|
||||||
rm.hold.add-to-hold-invalid-type={0} is neither a record nor a record folder nor active content. Only records, record \
|
rm.hold.add-to-hold-invalid-type={0} isn't a record, a record folder or active content. Only records, record \
|
||||||
folders or active content can be added to a hold.
|
folders or active content can be added to a hold.
|
||||||
rm.hold.add-to-hold-archived-node=Archived nodes can't be added to hold.
|
rm.hold.add-to-hold-archived-node=Archived content can't be added to a hold.
|
||||||
rm.hold.add-to-hold-locked-node=Locked nodes can't be added to hold.
|
rm.hold.add-to-hold-locked-node=Locked content can't be added to a hold.
|
||||||
rm.hold.delete-frozen-node=Frozen nodes can not be deleted.
|
rm.hold.delete-frozen-node=Frozen content can't be deleted.
|
||||||
rm.hold.delete-node-frozen-children=Can not delete node, because it contains a frozen child node.
|
rm.hold.delete-node-frozen-children=Can't delete folder because it contains frozen content.
|
||||||
rm.hold.move-frozen-node=Frozen nodes can not be moved.
|
rm.hold.move-frozen-node=Frozen content can't be moved.
|
||||||
rm.hold.update-frozen-node=Frozen nodes can not be updated.
|
rm.hold.update-frozen-node=Frozen content can't be updated.
|
@@ -34,6 +34,7 @@ import org.alfresco.rest.framework.core.exceptions.PermissionDeniedException;
|
|||||||
import org.alfresco.service.cmr.model.FileNotFoundException;
|
import org.alfresco.service.cmr.model.FileNotFoundException;
|
||||||
import org.alfresco.service.cmr.repository.ContentData;
|
import org.alfresco.service.cmr.repository.ContentData;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
import org.springframework.extensions.webscripts.GUID;
|
import org.springframework.extensions.webscripts.GUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,7 +78,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
catch (PermissionDeniedException pde)
|
catch (PermissionDeniedException pde)
|
||||||
{
|
{
|
||||||
assertTrue(pde.getMessage().contains("Frozen nodes can not be deleted."));
|
assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.delete-frozen-node")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -135,7 +136,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
catch (PermissionDeniedException pde)
|
catch (PermissionDeniedException pde)
|
||||||
{
|
{
|
||||||
assertTrue(pde.getMessage().contains("Frozen nodes can not be moved."));
|
assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.move-frozen-node")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -169,7 +170,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
catch (PermissionDeniedException pde)
|
catch (PermissionDeniedException pde)
|
||||||
{
|
{
|
||||||
assertTrue(pde.getMessage().contains("Frozen nodes can not be updated."));
|
assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.update-frozen-node")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -204,7 +205,7 @@ public class UpdateHeldActiveContentTest extends BaseRMTestCase
|
|||||||
}
|
}
|
||||||
catch (PermissionDeniedException pde)
|
catch (PermissionDeniedException pde)
|
||||||
{
|
{
|
||||||
assertTrue(pde.getMessage().contains("Frozen nodes can not be updated."));
|
assertTrue(pde.getMessage().contains(I18NUtil.getMessage("rm.hold.update-frozen-node")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user