what is $publicActions?

perhaps you are looking for $this->Auth->allow('add'); ...
Please take a look at the manual

On Oct 24, 2:06 pm, dsrawlins <[EMAIL PROTECTED]> wrote:
> I'm getting the message "You are not authorized to access that
> location." for my "add" function even though it is set with
> publicActions.  Any ideas?  Thanks, Dave
>
> class AppController extends Controller {
>
>     var $helpers = array('Html', 'Form');
>     var $components = array('Auth');
>
>     function beforeFilter() {
>         $this->Auth->fields = array('username' => 'email');
>         $this->Auth->userModel = 'Adult';
>     }
>
> }
>
> class AdultsController extends AppController {
>
>     var $name = 'Adults';
>     var $publicActions = array('add');
>
>     function login() {
>     }
>
>     function logout() {
>         $this->redirect($this->Auth->logout());
>     }
>
>    function add() {
>       if (!empty($this->data)) {
>          $this->Adult->create();
>          if ($this->Adult->save($this->data)) {
>             $this->Session->setFlash(__('The Adult has been saved',
> true));
>             $this->redirect(array('action'=>'index'));
>          } else {
>             $this->Session->setFlash(__('The Adult could not be
> saved.
> Please, try again.', true));
>          }
>       }
>    }
> .
> .
> .
>
> }
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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