Re: Auth 1.2 infinite redirect...

2008-01-20 Thread Ben Wilson

On Jan 20, 2008 9:11 AM, Ben Wilson <[EMAIL PROTECTED]> wrote:
> Could somebody clue me into why I'm encountering an infinite
> redirection loop? I'm using the latest Beta 1.2 series. My browser
> allows cookies. I am following what appears to be a pretty-good
> tutorial---and have made my users/groups table comply.[1] The only way
> to keep it from looping is to allow '*', which defeats the purpose.
>
>
> [1]: http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/


I think I've found the problem. I was using an element to create a
site-wide menu. In that element, a call was made to an action that was
not on the allow list. However, since it occurs on every page,
including /users/login, any attempt to call it resulted in a redirect
to /users/login. This resulted in the infinite loop. The culprit code
follows:

   $menus = $this->requestAction('menus/getMenus/header');

The solution was to add the action "getMenus" to the allow. This
corrected the problem. The solution code follows:

   $this->Auth->allow('getMenus');



-- 
Ben Wilson
"Words are the only thing which will last forever" Churchill

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Auth 1.2 infinite redirect...

2008-01-20 Thread Ben Wilson

Could somebody clue me into why I'm encountering an infinite
redirection loop? I'm using the latest Beta 1.2 series. My browser
allows cookies. I am following what appears to be a pretty-good
tutorial---and have made my users/groups table comply.[1] The only way
to keep it from looping is to allow '*', which defeats the purpose.


[1]: http://www.webdevelopment2.com/cakephp-auth-component-tutorial-1/
-- 
Ben Wilson
"Words are the only thing which will last forever" Churchill

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---