diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index 7514d1ed1..893b5b87b 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -314,7 +314,7 @@ class AuthComponent extends Object { } $methods = array_flip($controller->methods); - $action = strtolower($controller->params['action']); + $action = $controller->params['action']; $isMissingAction = ( $controller->scaffold === false && !isset($methods[$action]) @@ -337,7 +337,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) @@ -612,7 +612,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); } } @@ -632,7 +632,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 fb6f311b3..70901953f 100644 --- a/cake/tests/cases/libs/controller/components/auth.test.php +++ b/cake/tests/cases/libs/controller/components/auth.test.php @@ -825,7 +825,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->params['action'] = 'delete'; $this->assertTrue($this->Controller->Auth->startup($this->Controller)); @@ -833,14 +833,12 @@ class AuthTest extends CakeTestCase { $this->Controller->params['action'] = 'add'; $this->assertFalse($this->Controller->Auth->startup($this->Controller)); - $this->Controller->params['action'] = 'Add'; - $this->assertFalse($this->Controller->Auth->startup($this->Controller)); - $this->Controller->params['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->params['action'] = 'camelCase'; $this->assertFalse($this->Controller->Auth->startup($this->Controller)); @@ -940,7 +938,7 @@ class AuthTest extends CakeTestCase { $this->Controller->params['url']['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')); } /**