]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/admin/support/SupportRevokeCertificatesForm.java
fix: ResultSet.getDate is often wrong as it fetches day-precision times
[gigi.git] / src / org / cacert / gigi / pages / admin / support / SupportRevokeCertificatesForm.java
index ff64c6f5b1d3d10e5b70aa6c4ca1c10097c4bf6b..5b163cc46af10ab6f82a158102b01b605e0003c0 100644 (file)
@@ -16,9 +16,7 @@ import org.cacert.gigi.dbObjects.SupportedUser;
 import org.cacert.gigi.localisation.Language;
 import org.cacert.gigi.output.template.Form;
 import org.cacert.gigi.output.template.IterableDataset;
-import org.cacert.gigi.output.template.Outputable;
 import org.cacert.gigi.output.template.Template;
-import org.cacert.gigi.output.template.TranslateCommand;
 
 public class SupportRevokeCertificatesForm extends Form {
 
@@ -32,15 +30,12 @@ public class SupportRevokeCertificatesForm extends Form {
     }
 
     @Override
-    public boolean submit(PrintWriter out, HttpServletRequest req) throws GigiApiException {
-        if (user.getTicket() != null) {
-            user.revokeAllCertificates();
-            String subject = "Revoke certificates";
-            Outputable message = new TranslateCommand("All certificates in the account have been revoked.");
-            user.sendSupportNotification(subject, message);
-            return true;
+    public SubmissionResult submit(HttpServletRequest req) throws GigiApiException {
+        if (user.getTicket() == null) {
+            throw new GigiApiException("No ticket number set.");
         }
-        return false;
+        user.revokeAllCertificates();
+        return new RedirectResult(req.getPathInfo());
     }
 
     @Override