inscription utilisateur complète
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import subprocess
|
||||
from email_validator import validate_email, EmailNotValidError
|
||||
|
||||
from .config import getDockersConfig, getSecretConfig
|
||||
|
||||
@@ -7,7 +8,9 @@ sympa_pass = getSecretConfig("sympaServ", "SOAP_PASSWORD")
|
||||
sympa_listmaster = getSecretConfig("sympaServ", "ADMINEMAIL")
|
||||
sympa_url = f"https://{getDockersConfig('sympaHost')}.{getDockersConfig('domain')}"
|
||||
sympa_soap = "docker exec -i sympaServ /usr/lib/sympa/bin/sympa_soap_client.pl"
|
||||
sympa_liste_info = f"info@{getDockersConfig('domain_sympa')}"
|
||||
sympa_domain = getDockersConfig('domain_sympa')
|
||||
sympa_liste_info = "infos"
|
||||
|
||||
|
||||
# docker exec -i sympaServ /usr/lib/sympa/bin/sympa_soap_client.pl --soap_url=${httpProto}://${URL_LISTE}/sympasoap --trusted_application=${sympa_SOAP_USER} --trusted_application_password=${sympa_SOAP_PASSWORD} --proxy_vars=\"USER_EMAIL=${LISTMASTER}\" --service=add --service_parameters=\"${NL_LIST},${EMAIL_SOUHAITE}\"" | tee -a "${CMD_SYMPA}"
|
||||
|
||||
@@ -23,14 +26,14 @@ class Sympa:
|
||||
"""
|
||||
Ajouter un email dans une liste sympa
|
||||
"""
|
||||
output = self._execute_sympa_command(email, liste, 'add')
|
||||
output = self._execute_sympa_command(email, f"{liste}@{sympa_domain}", 'add')
|
||||
return output
|
||||
|
||||
def delete_email_from_list(self, email, liste=sympa_liste_info):
|
||||
"""
|
||||
Supprimer un email dans une liste sympa
|
||||
"""
|
||||
output = self._execute_sympa_command(email, liste, 'del')
|
||||
output = self._execute_sympa_command(email, f"{liste}@{sympa_domain}", 'del')
|
||||
return output
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user