I found the same thing. I moved my login and logout functions to a
security controller which handles other security based actions.
You answered your own question as unfortunately even though Auth has a
loginAction() method it does not have a logoutAction() method so it
needs to be excluded manually.
You can add a beforeFilter to the controller containing the logout
function like so:
function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('logout');
}
That will ensure that logout is ignored for all users.
On Feb 10, 12:25 pm, yisn <[email protected]> wrote:
> I followed the "Simple Acl controlled Application" in the Cookbook of
> CakePHP, and got the message "You arenotauthorizedto access that
> location" when try tologout. I logged in as a user who isnotallowed
> to access the UsersController actions.
>
> Do i need to grant the access to "logout" function for this user to
> fix this problem? But the "login" function doesnotneed to be
> granted, does the "auth" componentnotgrant access to "logout"
> function itself?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---