Fixing Auth component so login still works when you allow('*'), fixes #4159

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6473 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-02-24 03:20:43 +00:00
parent c1251c8265
commit bd2ac9a1c1
2 changed files with 6 additions and 9 deletions

View file

@ -272,10 +272,6 @@ class AuthComponent extends Object {
$this->data = $controller->data = $this->hashPasswords($controller->data);
if ($this->allowedActions == array('*') || in_array($controller->action, $this->allowedActions)) {
return false;
}
if (!isset($controller->params['url']['url'])) {
$url = '';
} else {
@ -283,6 +279,11 @@ class AuthComponent extends Object {
}
$this->loginAction = Router::normalize($this->loginAction);
if ($this->loginAction != Router::normalize($url) && ($this->allowedActions == array('*') || in_array($controller->action, $this->allowedActions))) {
return false;
}
if ($this->loginAction == Router::normalize($url)) {
if (empty($controller->data) || !isset($controller->data[$this->userModel])) {
if (!$this->Session->check('Auth.redirect') && env('HTTP_REFERER')) {

View file

@ -135,11 +135,7 @@ class FormHelper extends AppHelper {
}
}
}
$this->fieldset = array(
'fields' => $fields,
'key' => $object->primaryKey,
'validates' => $validates
);
$this->fieldset = array('fields' => $fields, 'key' => $object->primaryKey, 'validates' => $validates);
}
$data = $this->fieldset;