Merge branch 'master' into dist/envole/6/master

This commit is contained in:
2021-01-25 15:02:36 +01:00
5 changed files with 22 additions and 13 deletions

View File

@ -109,7 +109,8 @@ services:
- %ldap_port%
- %ldap_tls%
- %ldap_type%
- %ldap_addomaine%
- %ldap_addomainehome%
- %ldap_addomaineprofil%
calls:
- [setUser, ["%ldap_user%"]]
- [setPassword, ["%ldap_password%"]]

View File

@ -15,7 +15,8 @@ class ldapService
protected $port;
protected $tls;
protected $type;
protected $addomaine;
protected $addomainehome;
protected $addomaineprofil;
protected $baseDN;
protected $baseUser;
@ -29,13 +30,14 @@ class ldapService
private $connection = null;
private $ldapSync = false;
public function __construct($host, $port, $tls, $type, $addomaine)
public function __construct($host, $port, $tls, $type, $addomainehome, $addomaineprofil)
{
$this->host = $host;
$this->port = $port;
$this->tls = $tls;
$this->type = $type;
$this->addomaine = $addomaine;
$this->host = $host;
$this->port = $port;
$this->tls = $tls;
$this->type = $type;
$this->addomainehome = $addomainehome;
$this->addomaineprofil = $addomaineprofil;
}
public function isEnabled() {
@ -316,7 +318,8 @@ class ldapService
$attrs['sAMAccountName'] = $user->getUsername();
$attrs["userAccountControl"] = 544;
$attrs["homeDrive"] = "U:";
$attrs["homeDirectory"] = "\\\\".$this->addomaine."\\".$user->getUsername();
$attrs["homeDirectory"] = "\\\\".$this->addomainehome."\\".$user->getUsername();
$attrs["profilePath"] = "\\\\".$this->addomaineprofil."\\profiles\\".$user->getUsername();
}
$attrs['givenName'] = $user->getFirstname();

View File

@ -557,6 +557,7 @@ $api('$id',data);";
public function helloAction() {
$reponse = new Response('ninegate', Response::HTTP_OK);
$reponse->headers->set('Access-Control-Allow-Origin', '*');
return $reponse;
}