Merge pull request #790 from thomseddon/2.3-authcomponent

Remove legacy test for all actions allowed (*) in startup and tidy code
This commit is contained in:
Mark Story 2012-08-24 13:08:54 -07:00
commit e8221915a3

View file

@ -289,13 +289,7 @@ class AuthComponent extends Component {
$url = Router::normalize($url);
$loginAction = Router::normalize($this->loginAction);
$allowedActions = $this->allowedActions;
$isAllowed = (
$this->allowedActions == array('*') ||
in_array($action, array_map('strtolower', $allowedActions))
);
if ($loginAction != $url && $isAllowed) {
if ($loginAction != $url && in_array($action, array_map('strtolower', $this->allowedActions))) {
return true;
}