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;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.URI;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
|
||||
|
@ -38,22 +35,22 @@ public class ProctoringSettingsValidator implements ConstraintValidator<ValidPro
|
|||
passed = false;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
if (!InetAddress.getByName(new URI(value.serverURL).getHost()).isReachable(5000)) {
|
||||
context.disableDefaultConstraintViolation();
|
||||
context
|
||||
.buildConstraintViolationWithTemplate("proctoringSettings:serverURL:serverNotAvailable")
|
||||
.addPropertyNode("serverURL").addConstraintViolation();
|
||||
passed = false;
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
context.disableDefaultConstraintViolation();
|
||||
context
|
||||
.buildConstraintViolationWithTemplate("proctoringSettings:serverURL:serverNotAvailable")
|
||||
.addPropertyNode("serverURL").addConstraintViolation();
|
||||
passed = false;
|
||||
}
|
||||
// try {
|
||||
//
|
||||
// if (!InetAddress.getByName(new URI(value.serverURL).getHost()).isReachable(5000)) {
|
||||
// context.disableDefaultConstraintViolation();
|
||||
// context
|
||||
// .buildConstraintViolationWithTemplate("proctoringSettings:serverURL:serverNotAvailable")
|
||||
// .addPropertyNode("serverURL").addConstraintViolation();
|
||||
// passed = false;
|
||||
// }
|
||||
// } catch (final Exception e) {
|
||||
// context.disableDefaultConstraintViolation();
|
||||
// context
|
||||
// .buildConstraintViolationWithTemplate("proctoringSettings:serverURL:serverNotAvailable")
|
||||
// .addPropertyNode("serverURL").addConstraintViolation();
|
||||
// passed = false;
|
||||
// }
|
||||
|
||||
if (StringUtils.isBlank(value.appKey)) {
|
||||
context.disableDefaultConstraintViolation();
|
||||
|
|
Loading…
Reference in a new issue