ACS-3605 Add limit to maximum size of optional linkedToBy field.

This commit is contained in:
Tom Page
2022-10-04 15:54:31 +01:00
parent 6747e300af
commit 3682ddf652
4 changed files with 8 additions and 5 deletions

View File

@@ -54,6 +54,7 @@ public class RuleSetLoader
protected static final String IS_LINKED_TO = "isLinkedTo";
protected static final String RULE_IDS = "ruleIds";
private static final int MAX_INHERITED_BY_SIZE = 100;
private static final int MAX_LINKED_TO_BY_SIZE = 100;
private NodeService nodeService;
private RuleService ruleService;
private RestRuleModelMapper restRuleModelMapper;
@@ -123,7 +124,7 @@ public class RuleSetLoader
private List<NodeRef> loadLinkedToBy(NodeRef ruleSetNodeRef)
{
return ruleService.getFoldersLinkingToRuleSet(ruleSetNodeRef);
return ruleService.getFoldersLinkingToRuleSet(ruleSetNodeRef, MAX_LINKED_TO_BY_SIZE);
}
private boolean loadIsInherited(NodeRef ruleSetNodeRef)