Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #460

Merged
merged 8 commits into from
Nov 4, 2024
Merged

Test #460

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading