diff --git a/config/alfresco/public-rest-context.xml b/config/alfresco/public-rest-context.xml
index 4d2e997302..a5ce32ae10 100644
--- a/config/alfresco/public-rest-context.xml
+++ b/config/alfresco/public-rest-context.xml
@@ -146,6 +146,7 @@
+
diff --git a/source/test-java/org/alfresco/rest/api/tests/NodeApiTest.java b/source/test-java/org/alfresco/rest/api/tests/NodeApiTest.java
index 4a4dc15c01..14919a8df6 100644
--- a/source/test-java/org/alfresco/rest/api/tests/NodeApiTest.java
+++ b/source/test-java/org/alfresco/rest/api/tests/NodeApiTest.java
@@ -1503,6 +1503,32 @@ public class NodeApiTest extends AbstractBaseApiTest
tgt.setTargetParentId(rootNodeId);
post("nodes/"+d1Id+"/copy", user1, toJsonAsStringNonNull(tgt), null, 403);
}
+
+ @Test
+ public void testCopySite() throws Exception
+ {
+ TestNetwork networkOne = getTestFixture().getRandomNetwork();
+ TestPerson cs1 = networkOne.createUser();
+ TestSite tSite = createSite(networkOne, cs1, SiteVisibility.PRIVATE);
+
+ // create folder
+ Folder folderResp = createFolder(cs1.getId(), Nodes.PATH_MY, "siteCopytarget");
+ String targetId = folderResp.getId();
+
+ Map body = new HashMap<>();
+ body.put("targetParentId", targetId);
+
+ //test that you can't copy a site
+ post("nodes/"+tSite.getSiteInfo().getNodeRef().getId()+"/copy", cs1.getId(), toJsonAsStringNonNull(body), null, 422);
+
+ AuthenticationUtil.setFullyAuthenticatedUser(cs1.getId());
+ NodeRef docLibNodeRef = tSite.getContainerNodeRef("documentLibrary");
+
+ //test that you can't copy a site doclib
+ post("nodes/"+docLibNodeRef.getId()+"/copy", cs1.getId(), toJsonAsStringNonNull(body), null, 422);
+
+ }
+
/**
* Tests create folder.
* POST:
diff --git a/source/test-resources/test-rest-context.xml b/source/test-resources/test-rest-context.xml
index 6613c27ff6..dac4e1e42b 100644
--- a/source/test-resources/test-rest-context.xml
+++ b/source/test-resources/test-rest-context.xml
@@ -48,6 +48,7 @@
+