cake_1.2.x.x_6590
cache disabled
Auth has suddenly begun redirecting me to the login screen whenever I
try to access a particular controller. I've tried backing out a bunch
of changes (none of which has anything remotely to do with
authentication) without any success.
After a fruitless search, I set $this->Auth->allow('*') in both
AppController and this one to see if that would help. It didn't. I was
poking around in auth.php and noticed this:
if ($this->loginAction != Router::normalize($url) &&
($this->allowedActions == array('*') || in_array($controller->action,
$this->allowedActions))) {
return false;
}
I placed this just before that line:
die(debug($this->allowedActions));
and got this:
Array
(
[0] => *
[1] => *
)
It seems to me that that check in Auth would fail with the wildcards
stacked up like that.
But, that's not the end of it. I then uncommented my original
Auth->allow() lines and saw all allowed actions for both AppController
and this one (Artists). All appeared normal until I switched them back
to the wildcards. Right now, both have $this->Auth->allow('*') again
and the die(debug()) in Auth is displaying:
Array
(
[0] => *
[1] => index
[2] => view
[3] => admin_index
)
Now, those 3 actions are all in Artists. However, they're not the only
actions and they're not the only actions in $this->Auth->allow(). And,
in any case, that's currently set to the wildcard so those shouldn't
even be listed there:
function beforeFilter()
{
parent::beforeFilter();
//$this->Auth->allow('admin_index', 'index', 'view', 'search',
'alpha', 'getAlphaList');
$this->Auth->allow('*');
}
Aside from being pretty spooky, this is really irritating because, if
I remove the die() line in Auth, I still get redirected to the login.
It's like I've taken crazy pills here. Anyone got an idea for debugging this?
PS: maybe Auth::allowedActions should have dupes removed.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---