Re: Auth component WITHOUT ACL blocks every controller action

2012-04-19 Thread jeremyharris
I would not recommend this for a couple of reasons: 1. isAuthorized expects a boolean back, $this->Auth->user() returns null (falsey) or an array (truthy). This could break in the future. 2. It allows everyone in everywhere if they are just logged in (I guess that's okay if that's the intended

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread luca capra
Probably a more correct way could be function isAuthorized(){ return $this->Auth->user(); } Il 18/04/2012 00:24, jeremyharris ha scritto: Setting $this->Auth->authorize = array('Controller'); tells the AuthComponent where to run the `isAuthorized()` method, in this case, the Controller. You

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread jeremyharris
Setting $this->Auth->authorize = array('Controller'); tells the AuthComponent where to run the `isAuthorized()` method, in this case, the Controller. You can find more info here: http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#using-controllerauthorize On Tuesda

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread DigitalDude
Hey, h as I changed the code to the snippet of stork, it gave me a "... function isAuthorized() on a non-object (auth-component line 52). When I added the code of luca capra, everything is working as expected. All actions that are not allowed by $this->Auth->allow() within beforeFilter-functi

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread stork
> $this->Auth->authorize = 'controllers'; > $this->Auth->authorize = array('Controller'); -- 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 questio

Re: Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread luca capra
Il 17/04/2012 15:13, DigitalDude ha scritto: Hey, I have a little problem with the Auth component. Normally I use it together with ACL, everything works finde. Now I have a really small Project and I just want to have some authentication without ACL tables or different roles. ... What am I mis

Auth component WITHOUT ACL blocks every controller action

2012-04-17 Thread DigitalDude
Hey, I have a little problem with the Auth component. Normally I use it together with ACL, everything works finde. Now I have a really small Project and I just want to have some authentication without ACL tables or different roles. The basic setup is like the following: AppController $componen