]> WPIA git - gigi.git/blobdiff - src/club/wpia/gigi/dbObjects/User.java
add: handling of RA Agent Contract
[gigi.git] / src / club / wpia / gigi / dbObjects / User.java
index e3beaf86cf65ba2bd6a38eb883996d48859a455b..714bfc3a9122b95bcb1fad5bbd51a2f0ebb0678b 100644 (file)
@@ -209,7 +209,7 @@ public class User extends CertificateOwner {
         setPassword(newPass);
     }
 
-    private void setPassword(String newPass) throws GigiApiException {
+    public void setPassword(String newPass) throws GigiApiException {
         Name[] names = getNames();
         TreeSet<String> nameParts = new TreeSet<>();
         for (int i = 0; i < names.length; i++) {
@@ -242,6 +242,10 @@ public class User extends CertificateOwner {
             return false;
         }
 
+        if ( !Contract.hasSignedContract(this, Contract.ContractType.RA_AGENT_CONTRACT)) {
+            return false;
+        }
+
         return hasPassedCATS();
 
     }