]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/orga/AffiliationForm.java
upd: enforce a more strict Form call pattern.
[gigi.git] / src / org / cacert / gigi / pages / orga / AffiliationForm.java
index bf455bdecccf4a911cd9a837e2b69aa7e47ff8c0..42682fedcf949371ac1e83e5b7ca5bdae05eadc4 100644 (file)
@@ -29,18 +29,18 @@ public class AffiliationForm extends Form {
     }
 
     @Override
-    public boolean submit(HttpServletRequest req) throws GigiApiException {
+    public SubmissionResult submit(HttpServletRequest req) throws GigiApiException {
         if (req.getParameter("del") != null) {
             User toRemove = User.getByEmail(req.getParameter("del"));
             if (toRemove != null) {
                 o.removeAdmin(toRemove, LoginPage.getUser(req));
-                return true;
+                return new RedirectResult(ViewOrgPage.DEFAULT_PATH + "/" + o.getId());
             }
         } else if (req.getParameter("do_affiliate") != null) {
             User byEmail = User.getByEmail(req.getParameter("email"));
             if (byEmail != null && byEmail.canAssure()) {
                 o.addAdmin(byEmail, LoginPage.getUser(req), req.getParameter("master") != null);
-                return true;
+                return new RedirectResult(ViewOrgPage.DEFAULT_PATH + "/" + o.getId());
             } else {
                 throw new GigiApiException("Requested user is not a RA Agent. We need a RA Agent here.");
             }
@@ -69,8 +69,4 @@ public class AffiliationForm extends Form {
         });
         t.output(out, l, vars);
     }
-
-    public Organisation getOrganisation() {
-        return o;
-    }
 }