for (Permission permission : pMap.get(module)) {
JSONObject jpermission = new JSONObject();
jpermissions.element(jpermission);
jpermission.element("key", permission.getKey());
jpermission.element("value", permission.getValue());
jpermission.element("isValuePermission", permission.isValuePermission());
if (moduleController != null) {
PermissionTemplate permissionTemplate = moduleController.getPermissionTemplate(permission.getKey());
if (permissionTemplate != null) {
jpermission.element("editor", "v2js_" + permissionTemplate.getEditorTemplate());
if (!permissionTemplate.getValues().isEmpty()) {