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