@Sony

$this->Auth->
authorize = 'controller'; should be $this->Auth->
authorize = 'Controller'; 


Op woensdag 28 maart 2012 15:09:03 UTC+2 schreef Sony het volgende:
>
> Hi, 
>
> When I run a action, the access is refused because the method 
> isAuthorized() is never called. 
>
> AppController : 
>
> <?php 
>
> class AppController extends Controller { 
>
>         public $helpers = array ('Html', 'Form', 'Session', 'Time'); 
>
>         public $components = array('Session', 'Auth'); 
>
>         public function beforeFilter() 
>         { 
>                 $this->Auth->userModel = 'User'; 
>                 $this->Auth->fields = array('username' => 'username', 
> 'password' => 
> 'password'); 
>                 $this->Auth->loginAction = array('controller' => 'users', 
> 'action' 
> => 'login'); 
>                 $this->Auth->loginRedirect = '/'; 
>                 $this->Auth->loginError = 'Nom d\'utilisateur ou mot de 
> passe 
> incorrects.'; 
>                 $this->Auth->logoutRedirect = '/'; 
>                 $this->Auth->authError = 'Vous n\'avez pas accès à cette 
> page.'; 
>                 $this->Auth->autoRedirect = true; 
>                 $this->Auth->authorize = 'controller'; 
>
>                 debug('beforeFilter'); 
>         } 
>
>         public function isAuthorized($user = null) 
>         { 
>                 debug('isAuthorized'); 
>                 die(); 
>                 return true; 
>         } 
> } 
>
> My others controllers do not implement beforeFilter or isAuthorized.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to