I'm guessing your using the pages controller? Else I don't see what the
problem would be.

So, $this->Auth->allow('display');
should give you what you're looking for.

On Feb 16, 2008 2:30 PM, Rod D. <[EMAIL PROTECTED]> wrote:

>
> 1.2 Beta Auth Component, Allowing root to be public
> Cake: 1.2.0.6311 beta, Mysql: 5.0
> Ok, I have come so far, and I think this is my last hurdle.  I can not
> find the answer anywhere else, so here I am again.
>
> Since I have put the code in my app controller, my main page now
> requires login.  How do I "allow" the main page to be public for all
> (no login required)?
>
> The Allow method of the Auth component seems to only work for actions
> on the current controller.  But I am talking about the root page.
> (localhost).
>
> Here is my simple app controller (and what I did to get the user name
> available to the default layout).
>
> <?php
> class AppController extends Controller {
>        var $components = array('Auth');
>
>        function beforeFilter() {
>                $this->Auth->loginAction = array('controller' => 'echere',
> 'action'
> => 'login');
>                $this->Auth->loginRedirect = array('controller' =>
> 'echere',
> 'action' => 'index');
>                $this->Auth->logoutRedirect = '/';
>        }
>
>        function beforeRender(){
>                $this->set('curUser', $this->Auth->user('username'));
>        }
> }
> ?>
>
> So, close, but so far.
> -Rodney
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to