X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2Fpages%2Fwot%2FAssurePage.java;h=f553793e5d3d4ebd47d1e0e1cc9ff5d557f0a942;hp=015029601bbaeab65177fe572d1b890141bf3632;hb=086118bb498331de19b4d8d55caa59e0efd41402;hpb=d0a1017a937de3c426b7524c21400d23ff0c6bcb diff --git a/src/org/cacert/gigi/pages/wot/AssurePage.java b/src/org/cacert/gigi/pages/wot/AssurePage.java index 01502960..f553793e 100644 --- a/src/org/cacert/gigi/pages/wot/AssurePage.java +++ b/src/org/cacert/gigi/pages/wot/AssurePage.java @@ -20,6 +20,7 @@ import org.cacert.gigi.output.Form.CSRFError; import org.cacert.gigi.pages.LoginPage; import org.cacert.gigi.pages.Page; import org.cacert.gigi.util.Notary; +import org.cacert.gigi.util.Notary.AssuranceResult; public class AssurePage extends Page { public static final String PATH = "/wot/assure"; @@ -43,8 +44,10 @@ public class AssurePage extends Page { if (pi.length() > 1) { User myself = LoginPage.getUser(req); int mid = Integer.parseInt(pi.substring(1)); - - if (!Notary.checkAssuranceIsPossible(myself, new User(mid), out)) { + AssuranceResult check = Notary.checkAssuranceIsPossible(myself, + new User(mid)); + if (check != AssuranceResult.ASSURANCE_SUCCEDED) { + out.println(translate(req, check.getMessage())); return; } HttpSession hs = req.getSession();