Commit 3a1d23a531e17e7eddd27fcc4530ec36fa12216a

Authored by Alexandre
1 parent 0d982d72

Version: 2.4.3.5

Bugfixes LDAP
			
Version majeure en cours (2.5): https://projects.irap.omp.eu/versions/99

ROADMAP: https://projects.irap.omp.eu/projects/labinvent/roadmap
README-LABINVENT.md
... ... @@ -51,9 +51,9 @@ Logiciel testé et validé sur les configurations suivantes :
51 51 VERSION ACTUELLE
52 52  
53 53 Date: 10/06/2016
54   -Version: 2.4.3.4
  54 +Version: 2.4.3.5
55 55  
56   -Bugfixes
  56 +Bugfixes LDAP
57 57  
58 58 Version majeure en cours (2.5): https://projects.irap.omp.eu/versions/99
59 59  
... ...
src/Controller/PagesController.php
... ... @@ -50,11 +50,10 @@ class PagesController extends AppController
50 50  
51 51 //Si l'utilisateur n'est pas connecté, on le redirige vers la page login.ctp
52 52 //sauf si l'action demandé est 'about' ou si le mode install est activé
53   - if (!($this->LdapAuth->user('uid')[0]) && $path[0] != 'about' && !($configuration->mode_install)) {
  53 + if (!($this->LdapAuth->user($configuration->authentificationType_ldap)[0]) && $path[0] != 'about' && !($configuration->mode_install)) {
54 54 return $this->redirect(['controller' => 'users', 'action' => 'login']);
55 55 }
56 56  
57   -
58 57  
59 58 $count = count($path);
60 59 if (!$count) {
... ...
src/Model/Table/LdapConnectionsTable.php
... ... @@ -45,7 +45,6 @@ class LdapConnectionsTable extends AppTable {
45 45 $ldapUsers[] = [
46 46 'sn' => [$names[0]],
47 47 'mail' => [$user['email']],
48   - 'uid' => [$user['username']],
49 48 'givenname' => [$names[1]],
50 49 $this->authenticationType => [$user['username']],
51 50 'userpassword' => [$user['password']],
... ... @@ -55,7 +54,6 @@ class LdapConnectionsTable extends AppTable {
55 54 $ldapUsers[] = [
56 55 'sn' => [$names[0]],
57 56 'mail' => [$user['email']],
58   - 'uid' => [$user['username']],
59 57 'givenname' => " ",
60 58 $this->authenticationType => [$user['username']],
61 59 'userpassword' => [$user['password']],
... ... @@ -68,7 +66,6 @@ class LdapConnectionsTable extends AppTable {
68 66 'sn' => ['NOUVEL'],
69 67 'givenname' => ['UTILISATEUR'],
70 68 'mail' => [$prefix.'email'],
71   - 'uid' => [$prefix.'login'],
72 69 $this->authenticationType => [$prefix.'username'],
73 70 'userpassword' => [$prefix.'password'],
74 71 ];
... ... @@ -168,11 +165,11 @@ class LdapConnectionsTable extends AppTable {
168 165 //EP added
169 166 public function getFakeLdapUser($login) {
170 167 foreach ($this->fakeLDAPUsers as $user) {
171   - if ($login == $user['uid'][0]) return $user;
  168 + if ($login == $user[$this->authenticationType][0]) return $user;
172 169 }
173 170 return FALSE;
174 171 }
175   -
  172 +
176 173 /**
177 174 * Return a list of Users with key = login & value = username
178 175 */
... ...
src/Template/Layout/default.ctp
... ... @@ -94,7 +94,7 @@ $cakeDescription = 'Labinvent 2.0';
94 94 </i></td>
95 95 <td id="version">
96 96 <!-- VERSION M.m.f.b (version (M)ajeure, version (m)ineure, numero de nouvelle (f)onctionnalite, numero de (b)ugfix) -->
97   - <font color="black">VERSION 2.4.3.4 (10/06/2016)</font>
  97 + <font color="black">VERSION 2.4.3.5 (10/06/2016)</font>
98 98 </td>
99 99 </tr>
100 100 </table>
... ...
tests/TestCase/Controller/EmpruntsControllerTest.php
... ... @@ -38,7 +38,6 @@ class EmpruntsControllerTest extends IntegrationTestCase
38 38 'User' => [
39 39 'sn' => [0 => 'test2'],
40 40 'mail' => [0 => 'test@test.fr'],
41   - 'uid' => [0 => 'testa'],
42 41 'givenname' => [0 => 'test1'],
43 42 'cn' => [0 => 'testa'],
44 43 'userpassword' => [0 => 'test'],
... ...
tests/TestCase/Controller/MaterielsControllerTest.php
... ... @@ -40,7 +40,6 @@ class MaterielsControllerTest extends IntegrationTestCase
40 40 'User' => [
41 41 'sn' => [0 => 'test2'],
42 42 'mail' => [0 => 'testa@test.fr'],
43   - 'uid' => [0 => 'testa'],
44 43 'givenname' => [0 => 'test1'],
45 44 'cn' => [0 => 'testa'],
46 45 'userpassword' => [0 => 'test'],
... ... @@ -61,7 +60,6 @@ class MaterielsControllerTest extends IntegrationTestCase
61 60 'User' => [
62 61 'sn' => [0 => 'test4'],
63 62 'mail' => [0 => 'testz@test.fr'],
64   - 'uid' => [0 => 'testz'],
65 63 'givenname' => [0 => 'test3'],
66 64 'cn' => [0 => 'testz'],
67 65 'userpassword' => [0 => 'test'],
... ... @@ -80,7 +78,6 @@ class MaterielsControllerTest extends IntegrationTestCase
80 78 'User' => [
81 79 'sn' => [0 => 'test6'],
82 80 'mail' => [0 => 'teste@test.fr'],
83   - 'uid' => [0 => 'teste'],
84 81 'givenname' => [0 => 'test5'],
85 82 'cn' => [0 => 'teste'],
86 83 'userpassword' => [0 => 'test'],
... ... @@ -99,7 +96,6 @@ class MaterielsControllerTest extends IntegrationTestCase
99 96 'User' => [
100 97 'sn' => [0 => 'test8'],
101 98 'mail' => [0 => 'testr@test.fr'],
102   - 'uid' => [0 => 'testr'],
103 99 'givenname' => [0 => 'test7'],
104 100 'cn' => [0 => 'testr'],
105 101 'userpassword' => [0 => 'test'],
... ... @@ -118,7 +114,6 @@ class MaterielsControllerTest extends IntegrationTestCase
118 114 'User' => [
119 115 'sn' => [0 => 'test0'],
120 116 'mail' => [0 => 'testt@test.fr'],
121   - 'uid' => [0 => 'testt'],
122 117 'givenname' => [0 => 'test9'],
123 118 'cn' => [0 => 'testt'],
124 119 'userpassword' => [0 => 'test'],
... ...
tests/TestCase/Controller/PagesControllerTest.php
... ... @@ -42,7 +42,6 @@ class PagesControllerTest extends IntegrationTestCase
42 42 'User' => [
43 43 'sn' => [0 => 'test2'],
44 44 'mail' => [0 => 'test@test.fr'],
45   - 'uid' => [0 => 'testa'],
46 45 'givenname' => [0 => 'test1'],
47 46 'cn' => [0 => 'testa'],
48 47 'userpassword' => [0 => 'test'],
... ...
tests/TestCase/Controller/SuivisControllerTest.php
... ... @@ -39,7 +39,6 @@ class SuivisControllerTest extends IntegrationTestCase
39 39 'User' => [
40 40 'sn' => [0 => 'test2'],
41 41 'mail' => [0 => 'test@test.fr'],
42   - 'uid' => [0 => 'testa'],
43 42 'givenname' => [0 => 'test1'],
44 43 'cn' => [0 => 'testa'],
45 44 'userpassword' => [0 => 'test'],
... ...
tests/TestCase/Controller/UsersControllerTest.php
... ... @@ -38,7 +38,6 @@ class UsersControllerTest extends IntegrationTestCase
38 38 'User' => [
39 39 'sn' => [0 => 'test2'],
40 40 'mail' => [0 => 'test@test.fr'],
41   - 'uid' => [0 => 'testa'],
42 41 'givenname' => [0 => 'test1'],
43 42 'cn' => [0 => 'testa'],
44 43 'userpassword' => [0 => 'test'],
... ...