mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'feature-2.4/RM-3030_PreviewNotAvailableDeclaredRecord' into 'release/V2.4'
Feature 2.4/rm 3030 preview not available declared record RM-3030 - The documents declared as records in their Details page don't have the preview available afterwards. I've noticed different behavior when doing steps in different order: if the file is declared as record before navigating to document details page, the error doesn't reproduce; if document details page is accessed first and after declare the file as record, there is an Access Denied exception. In the first case the node for preview has the File Plan aspect, in the second one it doesn't. See merge request !105
This commit is contained in:
@@ -236,14 +236,14 @@ public class FilePlanComponentAspect extends BaseBehaviourBean
|
|||||||
|
|
||||||
// If the node has any renditions, they inherit the file plan from their source node.
|
// If the node has any renditions, they inherit the file plan from their source node.
|
||||||
List<ChildAssociationRef> renditions = renditionService.getRenditions(nodeRef);
|
List<ChildAssociationRef> renditions = renditionService.getRenditions(nodeRef);
|
||||||
NodeRef thumbnail;
|
NodeRef rendition;
|
||||||
for (ChildAssociationRef chAssRef : renditions)
|
for (ChildAssociationRef chAssRef : renditions)
|
||||||
{
|
{
|
||||||
thumbnail = chAssRef.getChildRef();
|
rendition = chAssRef.getChildRef();
|
||||||
if (nodeService.exists(thumbnail))
|
if (nodeService.exists(rendition))
|
||||||
{
|
{
|
||||||
// Apply file plan component aspect to thumbnail
|
// Apply file plan component aspect to node's renditions
|
||||||
nodeService.addAspect(thumbnail, ASPECT_FILE_PLAN_COMPONENT, null);
|
nodeService.addAspect(rendition, ASPECT_FILE_PLAN_COMPONENT, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user