RM-978 (Unable to navigate to copied folder from a collaboration site to RM site)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.3@94395 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2015-01-29 17:22:52 +00:00
parent 3b0b785a89
commit 5f0e38045c

View File

@@ -101,17 +101,19 @@ public class ObjectType extends BaseBehaviourBean implements NodeServicePolicies
NodeRef sourceParentNodeRef = nodeService.getPrimaryParent(sourceNodeRef).getParentRef();
boolean isSourceParentFilePlanComponent = isFilePlanComponent(sourceParentNodeRef);
boolean isTargetNodeFilePlanComponent = isFilePlanComponent(targetNodeRef);
NodeRef targetParentNodeRef = nodeService.getPrimaryParent(targetNodeRef).getParentRef();
boolean isTargetNodeParentFilePlanComponent = isFilePlanComponent(targetParentNodeRef);
// If we are doing the copy operation within the RM site then we can stop here
// The method should just check copy operations from outside of RM into the RM site
if (isSourceParentFilePlanComponent && isTargetNodeFilePlanComponent)
if (isSourceParentFilePlanComponent && isTargetNodeParentFilePlanComponent)
{
return;
}
// Do not allow to copy anything outside of RM site into the RM site
if (!isSourceParentFilePlanComponent && isTargetNodeFilePlanComponent)
if (!isSourceParentFilePlanComponent && isTargetNodeParentFilePlanComponent)
{
throw new AlfrescoRuntimeException("Nothing can be copied from a collaboration site into a RM site.");
}