It seems like the problem comes from the app_controller.php file but I
wonder what I have done wrong. In fact, when I drag the content of my
AppController class into each of my controllers and I add $this->Auth-
>allow("allowedAction1", "allowedAction2", ...); it works. But it is
far from optimal...

Here is an extract of the CookBook :

Like all components, you use it by adding 'auth' to the list of
components in your controller:
Code View

class FooController extends AppController {
    var $components = array('Auth');

   1. class FooController extends AppController {
   2. var $components = array('Auth');

Or add it to your AppController so all of your controllers will use
it:
Code View

class AppController extends Controller {
    var $components = array('Auth');


So, when I choose the first option (add the auth component in each
controller) it works and when I choose the second option (add the auth
component in the AppController) it doesn't.

Maybe what I do wrong is putting the beforeFilter() in the
AppController class ("Whenever you want to alter a default option for
AuthComponent, you do that by creating a beforeFilter() method for
your controller, and then calling various built-in methods or setting
component variables.").
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to