XMLRepo repo = XMLRepo.instance(pageContext);
String permName = request.getParameter("permName");
String pid = request.getParameter("pid");
if ((permName != null) && (pid != null)) {
Project project = (Project)repo.get(new Project(pid), false);
if (project != null) {
project.addPermission(permName);
repo.save(project);
out.print("success");
return;
}
}
failed