MNT-17241 (Access denied exception thrown during preview of certain content by non-admin/non-site member users)

This commit is contained in:
Tuna Aksoy
2016-12-19 13:45:52 +00:00
parent 65a3cc9951
commit 0ceba1359b

View File

@@ -211,6 +211,19 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
{
nodeService.setProperty(nodeRef, PROP_ROOT_NODEREF, root);
}
// If the node has any renditions, they inherit the file plan from their source node.
List<ChildAssociationRef> renditions = renditionService.getRenditions(nodeRef);
NodeRef rendition;
for (ChildAssociationRef chAssRef : renditions)
{
rendition = chAssRef.getChildRef();
if (nodeService.exists(rendition))
{
// Apply file plan component aspect to node's renditions
nodeService.addAspect(rendition, ASPECT_FILE_PLAN_COMPONENT, null);
}
}
}
return null;