Security component does not work in conjunction with Ajax.

If all your ajax requests are in a controller called Ajax, simply
place this in the beforeFilter().

/**
 * Executed before each action
 */
function beforeFilter() {
    parent::beforeFilter();

    // Turn debug off for ajax calls
    Configure::write('debug', 0);

    // Security
    $this->Security->validatePost = false;

    // Not ajax
    if (!$this->RequestHandler->isAjax()) {
        $this->Security->blackHole($this, 'You are not authorized to
process this request!');
    }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to