List<PermissionTemplate> templates = module.getPermissionTemplates();
Collections.sort(templates);
for (PermissionTemplate permissionTemplate : templates) {
JSONObject jPermission = new JSONObject();
jpermissions.element(jPermission);
jPermission.element("key", permissionTemplate.getKey());
jPermission.element("name", permissionTemplate.getName());
jPermission.element("highlight", permissionTemplate.isHighlight());
String code = "permissioninfo_" + permissionTemplate.getKey().toLowerCase();
jPermission.element("description", getMessages().getMessage(code, null, getLocale(request)));