浏览代码

Remove legacy test for all actions allowed (*) in startup and tidy code

Thom Seddon 13 年之前
父节点
当前提交
f3ba2bdb7d
共有 1 个文件被更改,包括 1 次插入7 次删除
  1. 1 7
      lib/Cake/Controller/Component/AuthComponent.php

+ 1 - 7
lib/Cake/Controller/Component/AuthComponent.php

@@ -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;
 		}