class Frontend {
  public static String casbinJsGetPermissionForUser(Enforcer e, String user) {<FILL_FUNCTION_BODY>}
}

    Model model = e.getModel();
    Map<String, Object> m = new HashMap<>();
    m.put("m", model.saveModelToText().trim());
    List<List<String>> policies = new ArrayList<>();
    for (String ptype : model.model.get("p").keySet()) {
      List<List<String>> policy = model.getPolicy("p", ptype);
      for (List<String> p : policy) {
        List<String> tmp = new ArrayList<>(p);
        tmp.add(0, ptype);
        policies.add(tmp);
      }
    }
    m.put("p", policies);
    return new Gson().toJson(m);
  
<no_super_class>