diff --git a/README-LABINVENT.md b/README-LABINVENT.md
index 454bcca..87ae6b5 100755
--- a/README-LABINVENT.md
+++ b/README-LABINVENT.md
@@ -51,9 +51,9 @@ Logiciel testé et validé sur les configurations suivantes :
VERSION ACTUELLE
Date: 10/06/2016
-Version: 2.4.3.4
+Version: 2.4.3.5
-Bugfixes
+Bugfixes LDAP
Version majeure en cours (2.5): https://projects.irap.omp.eu/versions/99
diff --git a/src/Controller/PagesController.php b/src/Controller/PagesController.php
index 9b976a4..fbb5b4b 100755
--- a/src/Controller/PagesController.php
+++ b/src/Controller/PagesController.php
@@ -50,11 +50,10 @@ class PagesController extends AppController
//Si l'utilisateur n'est pas connecté, on le redirige vers la page login.ctp
//sauf si l'action demandé est 'about' ou si le mode install est activé
- if (!($this->LdapAuth->user('uid')[0]) && $path[0] != 'about' && !($configuration->mode_install)) {
+ if (!($this->LdapAuth->user($configuration->authentificationType_ldap)[0]) && $path[0] != 'about' && !($configuration->mode_install)) {
return $this->redirect(['controller' => 'users', 'action' => 'login']);
}
-
$count = count($path);
if (!$count) {
diff --git a/src/Model/Table/LdapConnectionsTable.php b/src/Model/Table/LdapConnectionsTable.php
index f6ed90d..a092ef1 100755
--- a/src/Model/Table/LdapConnectionsTable.php
+++ b/src/Model/Table/LdapConnectionsTable.php
@@ -45,7 +45,6 @@ class LdapConnectionsTable extends AppTable {
$ldapUsers[] = [
'sn' => [$names[0]],
'mail' => [$user['email']],
- 'uid' => [$user['username']],
'givenname' => [$names[1]],
$this->authenticationType => [$user['username']],
'userpassword' => [$user['password']],
@@ -55,7 +54,6 @@ class LdapConnectionsTable extends AppTable {
$ldapUsers[] = [
'sn' => [$names[0]],
'mail' => [$user['email']],
- 'uid' => [$user['username']],
'givenname' => " ",
$this->authenticationType => [$user['username']],
'userpassword' => [$user['password']],
@@ -68,7 +66,6 @@ class LdapConnectionsTable extends AppTable {
'sn' => ['NOUVEL'],
'givenname' => ['UTILISATEUR'],
'mail' => [$prefix.'email'],
- 'uid' => [$prefix.'login'],
$this->authenticationType => [$prefix.'username'],
'userpassword' => [$prefix.'password'],
];
@@ -168,11 +165,11 @@ class LdapConnectionsTable extends AppTable {
//EP added
public function getFakeLdapUser($login) {
foreach ($this->fakeLDAPUsers as $user) {
- if ($login == $user['uid'][0]) return $user;
+ if ($login == $user[$this->authenticationType][0]) return $user;
}
return FALSE;
}
-
+
/**
* Return a list of Users with key = login & value = username
*/
diff --git a/src/Template/Layout/default.ctp b/src/Template/Layout/default.ctp
index 75df3c9..a2a4caf 100755
--- a/src/Template/Layout/default.ctp
+++ b/src/Template/Layout/default.ctp
@@ -94,7 +94,7 @@ $cakeDescription = 'Labinvent 2.0';
- VERSION 2.4.3.4 (10/06/2016)
+ VERSION 2.4.3.5 (10/06/2016)
|
diff --git a/tests/TestCase/Controller/EmpruntsControllerTest.php b/tests/TestCase/Controller/EmpruntsControllerTest.php
index 1b91739..955b189 100755
--- a/tests/TestCase/Controller/EmpruntsControllerTest.php
+++ b/tests/TestCase/Controller/EmpruntsControllerTest.php
@@ -38,7 +38,6 @@ class EmpruntsControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test2'],
'mail' => [0 => 'test@test.fr'],
- 'uid' => [0 => 'testa'],
'givenname' => [0 => 'test1'],
'cn' => [0 => 'testa'],
'userpassword' => [0 => 'test'],
diff --git a/tests/TestCase/Controller/MaterielsControllerTest.php b/tests/TestCase/Controller/MaterielsControllerTest.php
index 21da92d..c39eace 100755
--- a/tests/TestCase/Controller/MaterielsControllerTest.php
+++ b/tests/TestCase/Controller/MaterielsControllerTest.php
@@ -40,7 +40,6 @@ class MaterielsControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test2'],
'mail' => [0 => 'testa@test.fr'],
- 'uid' => [0 => 'testa'],
'givenname' => [0 => 'test1'],
'cn' => [0 => 'testa'],
'userpassword' => [0 => 'test'],
@@ -61,7 +60,6 @@ class MaterielsControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test4'],
'mail' => [0 => 'testz@test.fr'],
- 'uid' => [0 => 'testz'],
'givenname' => [0 => 'test3'],
'cn' => [0 => 'testz'],
'userpassword' => [0 => 'test'],
@@ -80,7 +78,6 @@ class MaterielsControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test6'],
'mail' => [0 => 'teste@test.fr'],
- 'uid' => [0 => 'teste'],
'givenname' => [0 => 'test5'],
'cn' => [0 => 'teste'],
'userpassword' => [0 => 'test'],
@@ -99,7 +96,6 @@ class MaterielsControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test8'],
'mail' => [0 => 'testr@test.fr'],
- 'uid' => [0 => 'testr'],
'givenname' => [0 => 'test7'],
'cn' => [0 => 'testr'],
'userpassword' => [0 => 'test'],
@@ -118,7 +114,6 @@ class MaterielsControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test0'],
'mail' => [0 => 'testt@test.fr'],
- 'uid' => [0 => 'testt'],
'givenname' => [0 => 'test9'],
'cn' => [0 => 'testt'],
'userpassword' => [0 => 'test'],
diff --git a/tests/TestCase/Controller/PagesControllerTest.php b/tests/TestCase/Controller/PagesControllerTest.php
index a6ef090..3a20abf 100755
--- a/tests/TestCase/Controller/PagesControllerTest.php
+++ b/tests/TestCase/Controller/PagesControllerTest.php
@@ -42,7 +42,6 @@ class PagesControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test2'],
'mail' => [0 => 'test@test.fr'],
- 'uid' => [0 => 'testa'],
'givenname' => [0 => 'test1'],
'cn' => [0 => 'testa'],
'userpassword' => [0 => 'test'],
diff --git a/tests/TestCase/Controller/SuivisControllerTest.php b/tests/TestCase/Controller/SuivisControllerTest.php
index 543325a..1cf29b6 100755
--- a/tests/TestCase/Controller/SuivisControllerTest.php
+++ b/tests/TestCase/Controller/SuivisControllerTest.php
@@ -39,7 +39,6 @@ class SuivisControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test2'],
'mail' => [0 => 'test@test.fr'],
- 'uid' => [0 => 'testa'],
'givenname' => [0 => 'test1'],
'cn' => [0 => 'testa'],
'userpassword' => [0 => 'test'],
diff --git a/tests/TestCase/Controller/UsersControllerTest.php b/tests/TestCase/Controller/UsersControllerTest.php
index ec497f9..13d992a 100755
--- a/tests/TestCase/Controller/UsersControllerTest.php
+++ b/tests/TestCase/Controller/UsersControllerTest.php
@@ -38,7 +38,6 @@ class UsersControllerTest extends IntegrationTestCase
'User' => [
'sn' => [0 => 'test2'],
'mail' => [0 => 'test@test.fr'],
- 'uid' => [0 => 'testa'],
'givenname' => [0 => 'test1'],
'cn' => [0 => 'testa'],
'userpassword' => [0 => 'test'],
--
libgit2 0.21.2