diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index 1fb0e2ca1..39ac96a37 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -302,7 +302,7 @@ class AuthComponent extends Object { } $methods = array_flip($controller->methods); - $action = strtolower($controller->request->params['action']); + $action = $controller->request->params['action']; $isMissingAction = ( $controller->scaffold === false && !isset($methods[$action]) @@ -326,7 +326,7 @@ class AuthComponent extends Object { $url = Router::normalize($url); $loginAction = Router::normalize($this->loginAction); - $allowedActions = array_map('strtolower', $this->allowedActions); + $allowedActions = $this->allowedActions; $isAllowed = ( $this->allowedActions == array('*') || in_array($action, $allowedActions) @@ -601,7 +601,7 @@ class AuthComponent extends Object { if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; } - $this->allowedActions = array_merge($this->allowedActions, array_map('strtolower', $args)); + $this->allowedActions = array_merge($this->allowedActions, $args); } } @@ -621,7 +621,7 @@ class AuthComponent extends Object { $args = $args[0]; } foreach ($args as $arg) { - $i = array_search(strtolower($arg), $this->allowedActions); + $i = array_search($arg, $this->allowedActions); if (is_int($i)) { unset($this->allowedActions[$i]); } diff --git a/cake/tests/cases/libs/controller/components/auth.test.php b/cake/tests/cases/libs/controller/components/auth.test.php index 99b4b85f5..8b75388eb 100644 --- a/cake/tests/cases/libs/controller/components/auth.test.php +++ b/cake/tests/cases/libs/controller/components/auth.test.php @@ -833,7 +833,7 @@ class AuthTest extends CakeTestCase { $this->Controller->Auth->initialize($this->Controller); $this->Controller->Auth->allow('*'); - $this->Controller->Auth->deny('add', 'camelcase'); + $this->Controller->Auth->deny('add', 'camelCase'); $this->Controller->request['action'] = 'delete'; $this->assertTrue($this->Controller->Auth->startup($this->Controller)); @@ -841,14 +841,11 @@ class AuthTest extends CakeTestCase { $this->Controller->request['action'] = 'add'; $this->assertFalse($this->Controller->Auth->startup($this->Controller)); - $this->Controller->request['action'] = 'Add'; - $this->assertFalse($this->Controller->Auth->startup($this->Controller)); - $this->Controller->request['action'] = 'camelCase'; $this->assertFalse($this->Controller->Auth->startup($this->Controller)); $this->Controller->Auth->allow('*'); - $this->Controller->Auth->deny(array('add', 'camelcase')); + $this->Controller->Auth->deny(array('add', 'camelCase')); $this->Controller->request['action'] = 'camelCase'; $this->assertFalse($this->Controller->Auth->startup($this->Controller)); @@ -948,7 +945,7 @@ class AuthTest extends CakeTestCase { $this->Controller->request->query['url'] = Router::normalize($url); $this->Controller->Auth->initialize($this->Controller); $this->Controller->Auth->allow('action_name', 'anotherAction'); - $this->assertEqual($this->Controller->Auth->allowedActions, array('action_name', 'anotheraction')); + $this->assertEqual($this->Controller->Auth->allowedActions, array('action_name', 'anotherAction')); } /**