mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-9937: Alfresco Share Icon on a folder that designates a rule
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32040 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -913,6 +913,18 @@ public class RuleServiceImpl
|
|||||||
// If this was the last rule on the node, remove the aspect
|
// If this was the last rule on the node, remove the aspect
|
||||||
if(countRules(nodeRef) == 0)
|
if(countRules(nodeRef) == 0)
|
||||||
{
|
{
|
||||||
|
// Since this is the last rule, unlink any linked rulesets
|
||||||
|
List<NodeRef> linkedFrom = getLinkedFromRuleNodes(nodeRef);
|
||||||
|
if (linkedFrom.isEmpty() == false)
|
||||||
|
{
|
||||||
|
for (NodeRef linkedFromNodeRef : linkedFrom)
|
||||||
|
{
|
||||||
|
NodeRef ruleFolder = getSavedRuleFolderAssoc(nodeRef).getChildRef();
|
||||||
|
nodeService.removeChild(linkedFromNodeRef, ruleFolder);
|
||||||
|
nodeService.removeAspect(linkedFromNodeRef, RuleModel.ASPECT_RULES);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.nodeService.removeAspect(nodeRef, RuleModel.ASPECT_RULES);
|
this.nodeService.removeAspect(nodeRef, RuleModel.ASPECT_RULES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user