+ } else if (req.getParameter("makeAgent") != null) {
+ User u = User.getByEmail(req.getParameter("agentEmail"));
+ if (u == null) {
+ resp.getWriter().println("User not found, or found user is not allowed to verify.");
+ } else {
+ if (u.getVerificationPoints() < 100) {
+ addVerificationPoints(100, u);
+ }
+ if ( !u.hasPassedCATS()) {
+ passCATS(u, CATSType.AGENT_CHALLENGE);
+ }
+ if ( !Contract.hasSignedContract(u, Contract.ContractType.RA_AGENT_CONTRACT)) {
+ try {
+ new Contract(u, Contract.ContractType.RA_AGENT_CONTRACT);
+ } catch (GigiApiException e) {
+ throw new Error(e);
+ }
+ }
+ resp.getWriter().println("User has all requirements to be an RA Agent");
+ }