Skip to content
Snippets Groups Projects
Commit 5d09e027 authored by srosse's avatar srosse
Browse files

no-jira: fix validate method which check uploaded certificate

parent 8a8bd818
No related branches found
No related tags found
No related merge requests found
......@@ -147,20 +147,20 @@ public class QTI21AdminController extends FormBasicController {
@Override
protected boolean validateFormLogic(UserRequest ureq) {
boolean allOk = true;
boolean allOk = super.validateFormLogic(ureq);
if(certificateEl.getUploadFile() != null) {
File uploadedCertificate = certificateEl.getUploadFile();
if(uploadedCertificate != null && uploadedCertificate.exists()) {
validateCertificatePassword(uploadedCertificate);
allOk &= validateCertificatePassword(uploadedCertificate);
}
} else {
String password = certificatePasswordEl.getValue();
if(!PASSWORD_PLACEHOLDER.equals(password) && certificateEl.getInitialFile() != null) {
validateCertificatePassword(certificateEl.getInitialFile());
allOk &= validateCertificatePassword(certificateEl.getInitialFile());
}
}
return allOk & super.validateFormLogic(ureq);
return allOk;
}
private boolean validateCertificatePassword(File file) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment