Commit b7f0fc55a2126cd3c339e50297e365dd6bc5e07b
1 parent
f084c88b
Exists in
master
and in
3 other branches
bugfix du bugfix...
Showing
14 changed files
with
17 additions
and
16 deletions
Show diff stats
src/Controller/AppController.php
... | ... | @@ -99,7 +99,7 @@ class AppController extends Controller { |
99 | 99 | * Autorisations fréquentes utilisées par bcp de isAuthorized() de controlleurs |
100 | 100 | * Ca évite de répéter 10 fois la meme chose !!! |
101 | 101 | */ |
102 | - public function isAuthorizedCommons() { | |
102 | + public function isAuthorizedCommons($user) { | |
103 | 103 | $action = $this->getActionPassed(); |
104 | 104 | //$role = $this->getUserRole($user); |
105 | 105 | |
... | ... | @@ -111,7 +111,8 @@ class AppController extends Controller { |
111 | 111 | } |
112 | 112 | |
113 | 113 | // By default |
114 | - return parent::isAuthorized($user); | |
114 | + //return parent::isAuthorized($user); | |
115 | + return AppController::isAuthorized($user); | |
115 | 116 | } |
116 | 117 | |
117 | 118 | /** | ... | ... |
src/Controller/CategoriesController.php
src/Controller/FournisseursController.php
src/Controller/GroupesMetiersController.php
src/Controller/GroupesThematiquesController.php
src/Controller/OrganismesController.php
src/Controller/SitesController.php
src/Controller/SousCategoriesController.php
src/Controller/SurCategoriesController.php
src/Controller/TypeDocumentsController.php
src/Controller/TypeSuivisController.php
src/Controller/UnitesController.php
src/Model/Table/LdapConnectionsTable.php
... | ... | @@ -269,8 +269,8 @@ class LdapConnectionsTable extends AppTable { |
269 | 269 | // => il a donc le role "Utilisateur" PAR DEFAUT |
270 | 270 | private function getTheFakeLdapUser() { |
271 | 271 | return [ |
272 | - 'login' => '_ldap_user_', | |
273 | - 'pass' => '_ldap_user_pass', | |
272 | + 'login' => '_fake_ldap_user_', | |
273 | + 'pass' => '_fake_ldap_user_pass', | |
274 | 274 | ]; |
275 | 275 | } |
276 | 276 | public function ldapAuthentication($login, $password) { | ... | ... |
tests/TestCase/Controller/General.php
... | ... | @@ -320,7 +320,7 @@ class General extends IntegrationTestCase { |
320 | 320 | } |
321 | 321 | public function authUtilisateurFromLdap() { |
322 | 322 | //$this->authUser('_NouvelUtilisateur_username', 'NOUVEL', 'UTILISATEUR'); |
323 | - $this->authUser('_ldap_user_', 'FAKE_LDAP', 'UTILISATEUR'); | |
323 | + $this->authUser('_fake_ldap_user_', 'FAKE_LDAP', 'UTILISATEUR'); | |
324 | 324 | } |
325 | 325 | /* |
326 | 326 | $user = [ | ... | ... |