+
+ if (assurer.getId() == assuree.getId()) {
+ throw new GigiApiException("You cannot verify yourself.");
+ }
+ if ( !assurer.canAssure()) {
+ throw new GigiApiException("You are not a RA-Agent.");
+ }
+
+ Name[] initialNames = this.assuree.getNonDeprecatedNames();
+ LinkedList<Name> names = new LinkedList<>();
+ for (Name name : initialNames) {
+ if (Notary.checkAssuranceIsPossible(assurer, name)) {
+ names.add(name);
+ }
+ }
+ if (names.size() == 0) {
+ throw new GigiApiException(SprintfCommand.createSimple("You have already verified all names of this applicant within the last {0} days.", Notary.LIMIT_DAYS_VERIFICATION));
+ }
+ assureeNames = names.toArray(new Name[names.size()]);