]> WPIA git - gigi.git/commitdiff
Merge "fix: Actually generate random IDs for use in tests"
authorFelix Dörre <felix@dogcraft.de>
Tue, 2 Aug 2016 11:58:02 +0000 (13:58 +0200)
committerGerrit Code Review <gigi-system@dogcraft.de>
Tue, 2 Aug 2016 11:58:02 +0000 (13:58 +0200)
src/org/cacert/gigi/dbObjects/Group.java
src/org/cacert/gigi/dbObjects/User.java
src/org/cacert/gigi/pages/account/certs/CertificateIssueForm.templ
src/org/cacert/gigi/pages/account/certs/RequestCertificate.templ
src/org/cacert/gigi/pages/admin/support/SupportUserDetailsForm.java
src/org/cacert/gigi/pages/admin/support/SupportUserDetailsForm.templ
src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.java
src/org/cacert/gigi/pages/admin/support/SupportUserDetailsPage.templ
src/org/cacert/gigi/pages/wot/AssuranceForm.java
src/org/cacert/gigi/pages/wot/AssurePage.java

index dd6767ef783cb8e0a309403983a90e6c17e22c90..e85b82775de44d5ad92b604e5b333b5349319a4f 100644 (file)
@@ -11,7 +11,7 @@ public enum Group {
     BLOCKEDLOGIN("blockedlogin", "may not login"), BLOCKEDCERT("blockedcert", "may not issue certificates"), //
     TTP_ASSURER("ttp-assurer", "may verify via TTP"), TTP_APPLICANT("ttp-applicant", "requests to be verified via ttp"), //
     CODESIGNING("codesigning", "may issue codesigning certificates"), ORGASSURER("orgassurer", "may verify organisations"), //
-    NUCLEUS_ASSURER("nucleus-assurer", "may issue nucleus assurances"), LOCATE_AGENT("locate-agent", "wants access to the locate agent system");
+    NUCLEUS_ASSURER("nucleus-assurer", "may enter nucleus verifications"), LOCATE_AGENT("locate-agent", "wants access to the locate agent system");
 
     private final String dbName;
 
index 61f347a4e90b380e70802d9871641da1ead0161f..cf43f80f3182a4377a1578b3f11ac370375f8e53 100644 (file)
@@ -136,7 +136,7 @@ public class User extends CertificateOwner {
     public void setDoB(DayDate dob) throws GigiApiException {
         synchronized (Notary.class) {
             if (getReceivedAssurances().length != 0) {
-                throw new GigiApiException("No change after assurance allowed.");
+                throw new GigiApiException("No change after verification allowed.");
             }
 
             if ( !CalendarUtil.isOfAge(dob, User.MINIMUM_AGE)) {
index 0bc3d1c2764c7a36a95d0659474b3a80f1cfb8a2..7fd6cf23a071ab558853d7766d25063a4fe1c411 100644 (file)
@@ -72,7 +72,7 @@
     </td>
     <td align="left">
       <label for="login"><?=_Enable certificate login with this certificate?><br />
-      <?=_By allowing certificate login, this certificate can be used to login into this account at https://secure.cacert.org/ .?></label>
+      <?=_By allowing certificate login, this certificate can be used to log into this account at !'<code>https://secure.cacert.org/</code>'.?></label>
     </td>
   </tr>
   <tr>
index 0711cddd4b6a0854a30ee5e118a3d3f208146b57..5139a695c235017855c9ad704f8858bca03c4123 100644 (file)
@@ -7,7 +7,7 @@
   </thead>
   <tbody>
   <tr>
-    <td><?=_I have a CSR! Paste it here:?><br/>Don't know, what as CSR is and how to create one? Take a look in the <a href="https://wiki.cacert.org/FAQ/CSR">Wiki</a>!</td>
+    <td><?=_I have a CSR! Paste it here:?><br/><?=_Don't know what a CSR is or how to create one? Take a look at the !'<a href="https://wiki.cacert.org/FAQ/CSR">'Wiki!'</a>'!?></td>
     <td>
       <textarea class="form-control" name="CSR" class="csr"></textarea>
     </td>
index 16ece06789d6c7be0f20477420b062bbe706fa79..bf6f1488b998d2eda8287dfd5d88ed798236a882 100644 (file)
@@ -92,6 +92,7 @@ public class SupportUserDetailsForm extends Form {
     protected void outputContent(PrintWriter out, Language l, Map<String, Object> vars) {
         User user = this.user.getTargetUser();
         vars.put("mail", user.getEmail());
+        vars.put("status", l.getTranslation(user.isValidEmail(user.getEmail()) ? "verified" : "not verified"));
         vars.put("exNames", new ArrayIterable<Name>(user.getNames()) {
 
             @Override
index 06dbd0423ae9410f8b79f2421364e9bf1758efc4..08ea759759aa273e07f098643774eca4a3e15d94 100644 (file)
@@ -4,7 +4,7 @@
         </tr>
         <tr>
             <td><?=_Email?>:</td>
-            <td><?=$mail?></td>
+            <td><?=$mail?><br/>(<?=$status?>)</td>
         </tr>
   <? foreach($exNames) { ?>
         <tr>
index 726bdd391566bd740b29faf426048d06047e9a5d..fad39e90c4007cc2b69b7f2eb90e0d78280d325f 100644 (file)
@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.cacert.gigi.GigiApiException;
+import org.cacert.gigi.dbObjects.Domain;
 import org.cacert.gigi.dbObjects.EmailAddress;
 import org.cacert.gigi.dbObjects.SupportedUser;
 import org.cacert.gigi.dbObjects.User;
@@ -48,15 +49,36 @@ public class SupportUserDetailsPage extends Page {
             @Override
             public boolean next(Language l, Map<String, Object> vars) {
                 for (; i < addrs.length;) {
-                    String address = addrs[i++].getAddress();
+                    EmailAddress secAddress = addrs[i++];
+                    String address = secAddress.getAddress();
                     if ( !address.equals(user.getEmail())) {
                         vars.put("secmail", address);
+                        vars.put("status", l.getTranslation(secAddress.isVerified() ? "verified" : "not verified"));
                         return true;
                     }
                 }
                 return false;
             }
         });
+
+        final Domain[] doms = user.getDomains();
+        vars.put("domains", new IterableDataset() {
+
+            private int point = 0;
+
+            @Override
+            public boolean next(Language l, Map<String, Object> vars) {
+                if (point >= doms.length) {
+                    return false;
+                }
+                Domain domain = doms[point];
+                vars.put("domain", domain.getSuffix());
+                vars.put("status", l.getTranslation(domain.isVerified() ? "verified" : "not verified"));
+                point++;
+                return true;
+            }
+        });
+
         vars.put("certifrevoke", new SupportRevokeCertificatesForm(req, targetUser));
         getDefaultTemplate().output(resp.getWriter(), getLanguage(req), vars);
     }
index 879367f91eb4763dea2513b100bea2574b410ebe..7b5b54e6d1b8de3f2622f7728d0e8bb92c25bd0a 100644 (file)
@@ -5,9 +5,22 @@
         </tr>
         <? foreach($emails) {?>
         <tr>
-            <td><?=$secmail?></td>
+            <td><?=$secmail?> (<?=$status?>)</td>
         </tr>
         <? } ?>
         </tbody>
 </table>
+
+<table class="table">
+        <tbody><tr>
+            <th><?=_Domains?></th>
+        </tr>
+        <? foreach($domains) {?>
+        <tr>
+            <td><?=$domain?> (<?=$status?>)</td>
+        </tr>
+        <? } ?>
+        </tbody>
+</table>
+
 <?=$certifrevoke?>
index aca82b917b68fbf6c2433712af1186b930b6ef72..e5521dab20b3ca251798811995d5c048502bad74 100644 (file)
@@ -152,14 +152,14 @@ public class AssuranceForm extends Form {
             try {
                 type = AssuranceType.valueOf(val);
             } catch (IllegalArgumentException e) {
-                gae.mergeInto(new GigiApiException("Assurance Type wrong."));
+                gae.mergeInto(new GigiApiException("Verification Type wrong."));
             }
         }
 
         int pointsI = 0;
         String points = req.getParameter("points");
         if (points == null || "".equals(points)) {
-            gae.mergeInto(new GigiApiException("For an assurance, you need to enter points."));
+            gae.mergeInto(new GigiApiException("For a verification, you need to enter points."));
         } else {
             try {
                 pointsI = Integer.parseInt(points);
@@ -191,8 +191,8 @@ public class AssuranceForm extends Form {
 
         if (aword != null && !aword.equals("")) {
             Language langApplicant = Language.getInstance(assuree.getPreferredLocale());
-            String method = langApplicant.getTranslation("A password reset was triggered. If you did a password reset by assurance, please enter your secret password using this form:");
-            String subject = langApplicant.getTranslation("Password reset by assurance");
+            String method = langApplicant.getTranslation("A password reset was triggered. If you did a password reset by verification, please enter your secret password using this form:");
+            String subject = langApplicant.getTranslation("Password reset by verification");
             PasswordResetPage.initPasswordResetProcess(out, assuree, req, aword, langApplicant, method, subject);
         }
         return true;
index 8d4a3aacb3259fbccf23c454cbd30cddff68f0a0..508a9c62413b5b5f0807d7ee300abe94e87737be 100644 (file)
@@ -26,7 +26,7 @@ public class AssurePage extends Page {
     private static final Template t = new Template(AssuranceForm.class.getResource("AssureeSearch.templ"));
 
     public AssurePage() {
-        super("Assure someone");
+        super("Verify someone");
 
     }
 
@@ -51,7 +51,7 @@ public class AssurePage extends Page {
             AssuranceForm form = Form.getForm(req, AssuranceForm.class);
             try {
                 if (form.submit(out, req)) {
-                    out.println(translate(req, "Assurance complete."));
+                    out.println(translate(req, "Verification complete."));
                     return;
                 }
             } catch (GigiApiException e) {