Compare commits

..

No commits in common. "da38947b4f4f3da54531a90ce0e1e957831b6a51" and "714a6e5a9c9ef2a33a889d9241accb3b762fcf60" have entirely different histories.

5 changed files with 9 additions and 15 deletions

View File

@ -87,6 +87,12 @@
<target type='filelist'>nineschool_nginx</target>
</condition>
<!-- AFFICHAGE EN FONCTION DE REVERSE PROXY -->
<condition name='disabled_if_in' source='activer_revprox'>
<param>oui</param>
<target type='filelist'>nineboard_nginx</target>
</condition>
<!-- AFFICHAGE EN FONCTION DE NINESCHOOL -->
<condition name='hidden_if_in' source='activer_nineschool'>
<param>non</param>

View File

@ -28,7 +28,6 @@ parameters:
ldapModel: '%env(resolve:LDAP_MODEL)%'
ldapHost: '%env(resolve:LDAP_HOST)%'
ldapPort: '%env(resolve:LDAP_PORT)%'
ldapTls: '%env(resolve:LDAP_TLS)%'
ldapUser: '%env(resolve:LDAP_USER)%'
ldapPassword: '%env(resolve:LDAP_PASSWORD)%'
ldapBasedn: '%env(resolve:LDAP_BASEDN)%'
@ -67,7 +66,6 @@ services:
bind:
$ldapHost: '%ldapHost%'
$ldapPort: '%ldapPort%'
$ldapTls: '%ldapTls%'
$ldapUser: '%ldapUser%'
$ldapPassword: '%ldapPassword%'
$ldapBasedn: '%ldapBasedn%'
@ -107,7 +105,7 @@ services:
app.ldap.service:
public: true
class: App\Service\ldapService
arguments: ["%ldapHost%","%ldapPort%","%ldapTls%","%ldapUser%","%ldapPassword%","%ldapBasedn%"]
arguments: ["%ldapHost%","%ldapPort%","%ldapUser%","%ldapPassword%","%ldapBasedn%"]
app.upload.samename:
public: true

View File

@ -32,6 +32,6 @@ then
if [ "$restart" == "yes" ] && [ "$1" != "stop" ] ; then
echo WEBSOCKET = START
systemctl restart $APP_ALIAS
bin/console app:Websocket --name $APP_ALIAS & disown
fi
fi

View File

@ -10,18 +10,16 @@ class ldapService
protected $host;
protected $port;
protected $tls;
protected $user = null;
protected $password = null;
protected $basedn;
private $connection = null;
public function __construct($ldapHost, $ldapPort, $ldapTls, $ldapUser, $ldapPassword, $ldapBasedn)
public function __construct($ldapHost, $ldapPort, $ldapUser, $ldapPassword, $ldapBasedn)
{
$this->host = $ldapHost;
$this->port = $ldapPort;
$this->tls = $ldapTls;
$this->user = $ldapUser;
$this->password = $ldapPassword;
$this->basedn = $ldapBasedn;
@ -34,9 +32,6 @@ class ldapService
$ldapConn = ldap_connect($this->host, $this->port);
if($ldapConn){
ldap_set_option($ldapConn, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldapConn, LDAP_OPT_REFERRALS, 0);
if($this->tls) ldap_start_tls($ldapConn);
if(ldap_bind( $ldapConn, $this->user, $this->password)){
$this->connection = $ldapConn;
return $this->connection;

View File

@ -63,11 +63,6 @@ LDAP_MODEL=open
%end if
LDAP_HOST=%%adresse_ip_ldap
LDAP_PORT=%%ldap_port
%if %%getVar("ldap_tls","non") == "oui"
LDAP_TLS=1
%else
LDAP_TLS=0
%end if
LDAP_USER=%%ldap_reader
LDAP_PASSWORD=%%pwdreader("",%%ldap_reader_passfile)
LDAP_BASEDN=%%ldap_base_dn