disable Remote Proctoring URL check on Port 5000
This commit is contained in:
parent
cbb882fcba
commit
6ea548548f
1 changed files with 16 additions and 19 deletions
|
@ -8,9 +8,6 @@
|
||||||
|
|
||||||
package ch.ethz.seb.sebserver.webservice.servicelayer.validation;
|
package ch.ethz.seb.sebserver.webservice.servicelayer.validation;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.URI;
|
|
||||||
|
|
||||||
import javax.validation.ConstraintValidator;
|
import javax.validation.ConstraintValidator;
|
||||||
import javax.validation.ConstraintValidatorContext;
|
import javax.validation.ConstraintValidatorContext;
|
||||||
|
|
||||||
|
@ -38,22 +35,22 @@ public class ProctoringSettingsValidator implements ConstraintValidator<ValidPro
|
||||||
passed = false;
|
passed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
// try {
|
||||||
|
//
|
||||||
if (!InetAddress.getByName(new URI(value.serverURL).getHost()).isReachable(5000)) {
|
// if (!InetAddress.getByName(new URI(value.serverURL).getHost()).isReachable(5000)) {
|
||||||
context.disableDefaultConstraintViolation();
|
// context.disableDefaultConstraintViolation();
|
||||||
context
|
// context
|
||||||
.buildConstraintViolationWithTemplate("proctoringSettings:serverURL:serverNotAvailable")
|
// .buildConstraintViolationWithTemplate("proctoringSettings:serverURL:serverNotAvailable")
|
||||||
.addPropertyNode("serverURL").addConstraintViolation();
|
// .addPropertyNode("serverURL").addConstraintViolation();
|
||||||
passed = false;
|
// passed = false;
|
||||||
}
|
// }
|
||||||
} catch (final Exception e) {
|
// } catch (final Exception e) {
|
||||||
context.disableDefaultConstraintViolation();
|
// context.disableDefaultConstraintViolation();
|
||||||
context
|
// context
|
||||||
.buildConstraintViolationWithTemplate("proctoringSettings:serverURL:serverNotAvailable")
|
// .buildConstraintViolationWithTemplate("proctoringSettings:serverURL:serverNotAvailable")
|
||||||
.addPropertyNode("serverURL").addConstraintViolation();
|
// .addPropertyNode("serverURL").addConstraintViolation();
|
||||||
passed = false;
|
// passed = false;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (StringUtils.isBlank(value.appKey)) {
|
if (StringUtils.isBlank(value.appKey)) {
|
||||||
context.disableDefaultConstraintViolation();
|
context.disableDefaultConstraintViolation();
|
||||||
|
|
Loading…
Reference in a new issue