RM-500: SOLR: "No items" message after complete Transfer action

* filtered non-existant node from search results



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0@42602 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2012-10-15 05:30:22 +00:00
parent ba98a48c1f
commit 020bcb2673

View File

@@ -521,28 +521,35 @@ public class RMAfterInvocationProvider extends RMSecurityCommon
// All permission checks must pass // All permission checks must pass
inclusionMask.set(i, true); inclusionMask.set(i, true);
int parentCheckRead = checkRead(returnedObject.getChildAssocRef(i).getParentRef()); if (nodeService.exists(returnedObject.getNodeRef(i)) == false)
int childCheckRead = checkRead(returnedObject.getNodeRef(i));
for (ConfigAttributeDefintion cad : supportedDefinitions)
{ {
NodeRef testNodeRef = returnedObject.getNodeRef(i); inclusionMask.set(i, false);
int checkRead = childCheckRead; }
if (cad.parent) else
{ {
testNodeRef = returnedObject.getChildAssocRef(i).getParentRef(); int parentCheckRead = checkRead(returnedObject.getChildAssocRef(i).getParentRef());
checkRead = parentCheckRead; int childCheckRead = checkRead(returnedObject.getNodeRef(i));
}
if (isUnfiltered(testNodeRef)) for (ConfigAttributeDefintion cad : supportedDefinitions)
{ {
continue; NodeRef testNodeRef = returnedObject.getNodeRef(i);
} int checkRead = childCheckRead;
if (cad.parent)
{
testNodeRef = returnedObject.getChildAssocRef(i).getParentRef();
checkRead = parentCheckRead;
}
if (inclusionMask.get(i) && (testNodeRef != null) && (checkRead != AccessDecisionVoter.ACCESS_GRANTED)) if (isUnfiltered(testNodeRef))
{ {
inclusionMask.set(i, false); continue;
} }
if (inclusionMask.get(i) && (testNodeRef != null) && (checkRead != AccessDecisionVoter.ACCESS_GRANTED))
{
inclusionMask.set(i, false);
}
}
} }
// Bug out if we are limiting by size // Bug out if we are limiting by size