public boolean appliesToCurrentEnvironment() {
    if (this.rules == null) return true;
    Rule.Action lastAction = Rule.Action.DISALLOW;

    for (Rule rule : this.rules) {
      Rule.Action action = rule.getAppliedAction();
      if (action != null) lastAction = action;
    }

    return lastAction == Rule.Action.ALLOW;
  }