RM-3181 and RM-3195 - error accessing caveatConfig.json after modifications

Caveat config file had filePlanComponent applied, but wasn't contained
within a file plan.
This commit is contained in:
Roy Wetherall
2016-04-05 14:38:36 +10:00
parent 2858241aed
commit d5031599fa
3 changed files with 6 additions and 5 deletions

View File

@@ -41,9 +41,6 @@
<title>Caveat Config</title>
<parent>cm:content</parent>
<archive>false</archive>
<mandatory-aspects>
<aspect>rma:filePlanComponent</aspect>
</mandatory-aspects>
</type>
<type name="rma:emailConfig">

View File

@@ -244,7 +244,8 @@ public class RMSecurityCommon implements ApplicationContextAware
{
// Get the file plan for the node
NodeRef filePlan = getFilePlanService().getFilePlan(nodeRef);
if (hasViewCapability(filePlan) == AccessStatus.DENIED)
if (filePlan != null &&
hasViewCapability(filePlan) == AccessStatus.DENIED)
{
if (logger.isDebugEnabled())
{

View File

@@ -411,7 +411,10 @@ public class JSONConversionComponent extends org.alfresco.repo.jscript.app.JS
// File plan node reference
NodeRef filePlan = filePlanService.getFilePlan(nodeRef);
result.put("filePlan", filePlan.toString());
if (filePlan != null)
{
result.put("filePlan", filePlan.toString());
}
// Unfiled container node reference
NodeRef unfiledRecordContainer = filePlanService.getUnfiledContainer(filePlan);