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;
// 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
// TODO Check for open jobs!
if (cert.getStatus() == CertificateStatus.ISSUED) {
writeSELog("SE Revoke certificate");
- cert.revoke().waitFor(60000);
+ cert.revoke(RevocationType.SUPPORT).waitFor(60000);
// 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());
}
}
- 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) {