code: public boolean addPolicy(String sec, String ptype, List<String> rule) {
          if (!hasPolicy(sec, ptype, rule)) {
              model.get(sec).get(ptype).policy.add(rule);
              return true;
          }
          return false;
      }
docs: addPolicy adds a policy rule to the model.
  
  @param sec the section, "p" or "g".
  @param ptype the policy type, "p", "p2", .. or "g", "g2", ..
  @param rule the policy rule.
  @return succeeds or not.