mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
104361: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 104249: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 104150: Merged DEV (4.2.5) to V4.2-BUG-FIX (4.2.5) 104089: MNT-13577: Incorrect site handling in Outlook client by Alfresco Administrator and Site Manager - Added unmovable aspect to restrict move of nodes. Unmovable aspect added to st:site type. - Added JUnit test. - Added patch for the fix. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@104517 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -982,6 +982,30 @@ public class SiteServiceImplTest extends BaseAlfrescoSpringTest
|
||||
}
|
||||
}
|
||||
|
||||
public void testMoveSite_ViaNodeService()
|
||||
{
|
||||
String siteShortName1 = "testMoveSite" + GUID.generate();
|
||||
String siteShortName2 = "testMoveSite" + GUID.generate();
|
||||
this.siteService.createSite(TEST_SITE_PRESET, siteShortName1, TEST_TITLE, TEST_DESCRIPTION, SiteVisibility.PUBLIC);
|
||||
this.siteService.createSite(TEST_SITE_PRESET, siteShortName2, TEST_TITLE, TEST_DESCRIPTION, SiteVisibility.PUBLIC);
|
||||
|
||||
SiteInfo siteInfo1 = this.siteService.getSite(siteShortName1);
|
||||
assertNotNull(siteInfo1);
|
||||
SiteInfo siteInfo2 = this.siteService.getSite(siteShortName2);
|
||||
assertNotNull(siteInfo2);
|
||||
|
||||
// move a site through the nodeService - not allowed
|
||||
try
|
||||
{
|
||||
nodeService.moveNode(siteInfo1.getNodeRef(), siteInfo2.getNodeRef(), ContentModel.ASSOC_CONTAINS, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, GUID.generate()));
|
||||
fail("Shouldn't be able to move a site via the nodeService");
|
||||
}
|
||||
catch (AlfrescoRuntimeException expected)
|
||||
{
|
||||
// Intentionally empty
|
||||
}
|
||||
}
|
||||
|
||||
public void testDeleteSite()
|
||||
{
|
||||
@SuppressWarnings("deprecation")
|
||||
|
Reference in New Issue
Block a user