Skip to content

Commit

Permalink
Merge pull request #460 from EsupPortail/test
Browse files Browse the repository at this point in the history
Test
  • Loading branch information
dlemaignent authored Nov 4, 2024
2 parents 0b49260 + d6930a0 commit f839b3f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</parent>
<groupId>org.esupportail</groupId>
<artifactId>esup-signature</artifactId>
<version>1.31.0</version>
<version>1.31.1-SNAPSHOT</version>
<name>esup-signature</name>
<properties>
<startClass>org.esupportail.esupsignature.EsupSignatureApplication</startClass>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public enum TokenType {
private SignRequestParams externalSignatureParams = new SignRequestParams();

/**
* Activation de l'intro d'aide
* Activation de lintro daide
*/
private Boolean enableHelp = true;

Expand All @@ -299,6 +299,9 @@ public enum TokenType {
*/
private String testEmail;

/**
* Activer la vérification des numéros de téléphone français pour l’OTP
*/
Boolean frenchPhoneNumberOnly = false;

public String getRootUrl() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ public SignatureTokenConnection getSealToken() {
}

public AbstractKeyStoreTokenConnection getPkcsToken() throws EsupSignatureKeystoreException {
if(!StringUtils.hasText(globalProperties.getSealCertificatPin())) {
if (!StringUtils.hasText(globalProperties.getSealCertificatDriver()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS11)) {
if(StringUtils.hasText(globalProperties.getSealCertificatPin())) {
if (StringUtils.hasText(globalProperties.getSealCertificatDriver()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS11)) {
KeyStore.PasswordProtection passwordProtection = new KeyStore.PasswordProtection(globalProperties.getSealCertificatPin().toCharArray());
return new eu.europa.esig.dss.token.Pkcs11SignatureToken(globalProperties.getSealCertificatDriver(), passwordProtection);
} else if (!StringUtils.hasText(globalProperties.getSealCertificatFile()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS12)) {
Expand All @@ -199,7 +199,7 @@ public List<DSSPrivateKeyEntry> getSealCertificats() {
if(privateKeysCache.getIfPresent("keys") != null) return privateKeysCache.getIfPresent("keys");
List<DSSPrivateKeyEntry> dssPrivateKeyEntries = new ArrayList<>();
try {
if ((!StringUtils.hasText(globalProperties.getSealCertificatDriver()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS11)) || globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS12)) {
if ((StringUtils.hasText(globalProperties.getSealCertificatDriver()) && globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS11)) || globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.PKCS12)) {
dssPrivateKeyEntries = getPkcsToken().getKeys();
} else if (globalProperties.getSealCertificatType().equals(GlobalProperties.TokenType.OPENSC)) {
dssPrivateKeyEntries = openSCSignatureToken.getKeys();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/fragments/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h5 class="newToggled d-none">Outils de signature</h5>
</a>
<hr class="newHr d-none">
<h5 class="newToggled d-none">Circuits</h5>
<a th:unless="${globalProperties.hideWizardWorkflow}" id="start-wizard-button-3" role="button" class="globalButton btn btn-material btn-light text-center pt-3 me-2 mb-2 overflow-hidden p-0"
<a th:unless="${globalProperties.hideWizardWorkflow}" th:if="${!isUserOnSu}" id="start-wizard-button-3" role="button" class="globalButton btn btn-material btn-light text-center pt-3 me-2 mb-2 overflow-hidden p-0"
data-bs-toggle="modal" data-bs-target="#wiz-modal" style="width: 120px; height: 170px;"
title="Créer un circuit personnel à l'aide de l'assistant" >
<div class="crop">
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/templates/fragments/sides/side-home.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="fr">
<!--/*@thymesVar id="activeMenu" type="java.lang.String"*/-->
<nav th:fragment="side-home" id="sidebar">
<nav th:fragment="side-home" id="sidebar" th:with="isUserOnSu = ${userEppn != authUserEppn}">
<div class="ms-1 mt-2">
<h5 class="text-center sidebar-label"><b>Outils</b></h5>
<a th:unless="${globalProperties.hideWizardWorkflow}" id="start-wizard-button-2" role="button" class="btn btn-light mb-1 col-12 text-left border-light-subtle" data-bs-toggle="modal" data-bs-target="#wiz-modal" title="Créez un nouveau circuit à l'aide de l'assistant">
<a th:unless="${globalProperties.hideWizardWorkflow}" th:if="${!isUserOnSu}" id="start-wizard-button-2" role="button" class="btn btn-light mb-1 col-12 text-left border-light-subtle" data-bs-toggle="modal" data-bs-target="#wiz-modal" title="Créez un nouveau circuit à l'aide de l'assistant">
<i class="fa-solid fa-magic"></i> Assistant de création de circuit
</a>
<a title="Valider la signature d'un document" href="/user/validation" class="btn btn-light mb-1 col-12 text-left border-light-subtle" style="width: 250px;">
Expand Down

0 comments on commit f839b3f

Please sign in to comment.