<strong>Important Update (2007-07-24) : </strong> Brian <a href="http://lemoncake.wordpress.com/2007/07/19/using-authcomponent- and-acl-in-cakephp-12/#comment-75">brought to my attention</a> a problem with multiple actions that have the same name. This problem is due to an incorrect Sql query in db_acl.php. I have filed <a href="https://trac.cakephp.org/ticket/2976">Trac Ticket #2976</a> which includes a patch to fix the error.
Geoff -- http://lemoncake.wordpress.com On Jul 20, 9:10 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > Hey cakeFreak, > > I have a slightly different approach for development bypassing. I > have a condition like > > if (Config::read()) { > $this->Auth->allow(); > > } > > This checks if CAKE_DEBUG is greater than 0 and bypass authentication > and authorization. > > Personally I think it is safer than the extra property way that you > have shown cause you may forget to turn it off, whereas with using > DEBUG you will notice when you forget to turn it off when debug > statements and sql logs start showing up :) > > Geoff > --http://lemoncake.wordpress.com > > On Jul 20, 7:22 pm, cakeFreak <[EMAIL PROTECTED]> wrote: > > > Hey Geoff Ford, > > > cheers for the tutorial! > > > Great! > > > I just modified a bit you beforeFilter function in the AppController > > to basically allow access to all controllers during development with > > ease! > > > ----------------------------------------------------------------------------------------------------------------------------------------- > > function beforeFilter(){ > > if (isset($this->Auth)) { > > $this->Auth->userScope = array('User.disabled' => 0); > > $this->Auth->loginAction = '/users/login'; > > $this->Auth->loginRedirect = '/users/account'; > > $this->Auth->fields = array('username' => 'username', > > 'password' => 'passwrd'); > > $this->Auth->authorize = 'actions'; > > > if(!$this->inDev){ > > if (in_array(low($this->params['controller']), $this- > > > >publicControllers)) { > > > $this->Auth->allow(); > > } > > } > > else{ > > $this->Auth->allow('*'); > > } > > } > > } > > ----------------------------------------------------------------------------------------------------------------------------------------- > > > Then in your App controller you set: > > > var $inDev = true; //true if your are in development phase / false if > > the app is live --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---
