package in.twizmwaz.cardinal.module.modules.filter.type.old;

import in.twizmwaz.cardinal.module.ModuleCollection;
import in.twizmwaz.cardinal.module.modules.filter.FilterModule;
import in.twizmwaz.cardinal.module.modules.filter.FilterState;
import in.twizmwaz.cardinal.module.modules.filter.parsers.ChildrenFilterParser;

import static in.twizmwaz.cardinal.module.modules.filter.FilterState.*;

public class AllowFilter extends FilterModule {

    private final ModuleCollection<FilterModule> children;

    public AllowFilter(final ChildrenFilterParser parser) {
        super(parser.getName());
        this.children = parser.getChildren();
    }

    @Override
    public FilterState evaluate(final Object... objects) {
        for (FilterModule child : children) {
            if (child.evaluate(objects).equals(DENY)) return DENY;
            if (child.evaluate(objects).equals(ALLOW)) return ALLOW;
        }
        return ABSTAIN;
    }

}

@@ -713,24 +713,56 @@
  objects) %7B%0A
+        boolean abstain = true;%0A
         for 
@@ -870,32 +870,33 @@
             if (
+!
 child.evaluate(o
@@ -915,27 +915,32 @@
 ls(A
-LLOW)) return ALLOW
+BSTAIN)) abstain = false
 ;%0A  
@@ -954,16 +954,29 @@
 %0A       
+ if (abstain)
  return 
@@ -984,16 +984,38 @@
 BSTAIN;%0A
+        return ALLOW;%0A
     %7D%0A%0A%7D

Add abstination back to allow filters