]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/pages/wot/AssuranceForm.java
fix: show max assurance points of the assurer (instread of the assuree)
[gigi.git] / src / org / cacert / gigi / pages / wot / AssuranceForm.java
index b1cfbae950ae09afecb62ad6610d3a41676f5f1e..6e37ecc88fdafd8412a344526108f39ace94e167 100644 (file)
@@ -37,6 +37,8 @@ public class AssuranceForm extends Form {
 
     private String aword;
 
+    private User assurer;
+
     private static final Template templ;
     static {
         templ = new Template(AssuranceForm.class.getResource("AssuranceForm.templ"));
@@ -44,6 +46,7 @@ public class AssuranceForm extends Form {
 
     public AssuranceForm(HttpServletRequest hsr, User assuree) {
         super(hsr);
+        assurer = Page.getUser(hsr);
         this.assuree = assuree;
         assureeName = this.assuree.getName();
         dob = this.assuree.getDoB();
@@ -59,7 +62,7 @@ public class AssuranceForm extends Form {
         res.putAll(vars);
         res.put("nameExplicit", assuree.getName());
         res.put("name", assuree.getName().toString());
-        res.put("maxpoints", assuree.getMaxAssurePoints());
+        res.put("maxpoints", assurer.getMaxAssurePoints());
         res.put("dob", sdf.format(assuree.getDoB()));
         res.put("dobFmt2", sdf2.format(assuree.getDoB()));
         res.put("location", location);
@@ -105,7 +108,7 @@ public class AssuranceForm extends Form {
             return false;
         }
         try {
-            Notary.assure(Page.getUser(req), assuree, assureeName, dob, pointsI, location, req.getParameter("date"));
+            Notary.assure(assurer, assuree, assureeName, dob, pointsI, location, req.getParameter("date"));
             if (aword != null && !aword.equals("")) {
                 String systemToken = RandomToken.generateToken(32);
                 int id = assuree.generatePasswordResetTicket(Page.getUser(req), systemToken, aword);
@@ -113,7 +116,7 @@ public class AssuranceForm extends Form {
                     Language l = Language.getInstance(assuree.getPreferredLocale());
                     StringBuffer body = new StringBuffer();
                     body.append(l.getTranslation("Hi,") + "\n\n");
-                    body.append(l.getTranslation("A password reset was triggered. If you did a password reset by assurance, please enter your secret password using this form: \n"));
+                    body.append(l.getTranslation("A password reset was triggered. If you did a password reset by assurance, please enter your secret password using this form: \nhttps://"));
                     body.append(ServerConstants.getWwwHostNamePortSecure() + PasswordResetPage.PATH);
                     body.append("?id=");
                     body.append(id);