public static final String SYSADMIN_ROLE_NAME = "sysadmin";
protected void beforeObjectCommit(Object object, Session session, ActionMapping actionMapping, ActionForm actionForm,
HttpServletRequest request, HttpServletResponse reply) throws Exception {
RoleEditorForm roleForm = (RoleEditorForm)actionForm;
Project project = (Project)object;
int projectId = project.getId();
for (int index = 0; index < roleForm.getPersonCount(); index++) {
int personId = roleForm.getPersonIdAsInt(index);
if (isAuthorizedRoleAdministratorForProject(request, projectId)) {
deleteRoleAssociationsForProject(session, projectId, personId);
addRoleAssociationForProject(session, projectId, personId, roleForm.getPersonRole(index));
}
}
}