From ca87fc40d1d6254ac32a92fa8cc314efe0233773 Mon Sep 17 00:00:00 2001 From: Tuna Aksoy Date: Thu, 29 Jan 2015 17:22:52 +0000 Subject: [PATCH] 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 --- .../org_alfresco_module_rm/model/rma/type/ObjectType.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/ObjectType.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/ObjectType.java index b68236fe98..450b46ff58 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/ObjectType.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/model/rma/type/ObjectType.java @@ -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."); }