X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fclub%2Fwpia%2Fgigi%2FdbObjects%2FSupportedUser.java;h=1eae478f6a0eb872a03f8a14682f84958ab1e529;hb=321275b98020a0bc4e26369296cc60fb85c15c23;hp=c9364f4ef63ad96cbf0fd14c10c2bcbcb5d7c167;hpb=bccd4cc0dba0f89aa045b113bac46eb8cc1dab4e;p=gigi.git diff --git a/src/club/wpia/gigi/dbObjects/SupportedUser.java b/src/club/wpia/gigi/dbObjects/SupportedUser.java index c9364f4e..1eae478f 100644 --- a/src/club/wpia/gigi/dbObjects/SupportedUser.java +++ b/src/club/wpia/gigi/dbObjects/SupportedUser.java @@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest; import club.wpia.gigi.GigiApiException; import club.wpia.gigi.database.GigiPreparedStatement; import club.wpia.gigi.dbObjects.Certificate.CertificateStatus; +import club.wpia.gigi.dbObjects.Certificate.RevocationType; import club.wpia.gigi.localisation.Language; import club.wpia.gigi.output.template.MailTemplate; import club.wpia.gigi.output.template.Outputable; @@ -54,7 +55,7 @@ public class SupportedUser { // TODO Check for open jobs! for (int i = 0; i < certs.length; i++) { if (certs[i].getStatus() == CertificateStatus.ISSUED) { - certs[i].revoke(); + certs[i].revoke(RevocationType.SUPPORT); } } // send notification to support @@ -69,7 +70,7 @@ public class SupportedUser { // TODO Check for open jobs! if (cert.getStatus() == CertificateStatus.ISSUED) { writeSELog("SE Revoke certificate"); - cert.revoke().waitFor(60000); + cert.revoke(RevocationType.SUPPORT).waitFor(Job.WAIT_MIN); // send notification to support String subject = "Revoke certificate"; Outputable message = SprintfCommand.createSimple("Certificate with serial number {0} for {1} <{2}> has been revoked.", cert.getSerial(), target.getPreferredName().toString(), target.getEmail()); @@ -174,13 +175,14 @@ public class SupportedUser { } } - public void triggerPasswordReset(String aword, HttpServletRequest req) { + public void triggerPasswordReset(String aword, HttpServletRequest req) throws GigiApiException { Language l = Language.getInstance(target.getPreferredLocale()); String method = l.getTranslation("A password reset was triggered. Please enter the required text sent to you by support on this page:"); String subject = l.getTranslation("Password reset by support."); PasswordResetPage.initPasswordResetProcess(target, req, aword, l, method, subject); Outputable message = new TranslateCommand("A password reset was triggered and an email was sent to user."); sendSupportNotification(subject, message); + writeSELog("SE triggered password reset"); } private void sendBoardNotification(String subject, Outputable message) {