I appolagize.
But if parent::before filter is called in the controller and reads production or development anything called after that will be over-ridden no?
You cannot get an API called back to a password protected folder so you have to remove the password protection, but if you want it to be a hidden folder which is not accessible you need a way to hide it.
Dave Maharaj
Freelance Designer | Developer
www.movepixels.com | dave@movepixels.com | 709.800.0852
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of AD7six
Sent: Saturday, November 30, 2013 11:08 AM
To: cake-php@googlegroups.com
Subject: Re: Production and Development Environment
On Friday, 29 November 2013 05:45:50 UTC+1, advantage+ wrote:
Hmm sounds like the exact thing I said……..and if you do
Beforefilter::parent () in the controller what was the point of asking if there is an easy way to no go thur every controller!
Example::
public function beforeFilter() {
parent::beforeFilter();
$this->Auth->deny();
//Allow Security to allow ajax request for these actions
$ajax_request = array('manage_add', 'manage_edit', 'manage_delete');
if(in_array($this->params['action'], $ajax_request)){
$this->Security->unlockedActions = $ajax_request;
$this->Security->csrfCheck = false;
}
}
Since parent:: is called you have to go thru every controller no?
If you see a correct way I happy to hear about it.
Thanks,
Dave.
No comments:
Post a Comment