I have an application that uses Auth and ACL to check permissions in
the app_controller. I am also checking permissions on every AJAX call
by using jQuery's AjaxSetup to capture the XmlHttpRequest URL. This
process works perfectly for any manual AJAX call, but for Ajaxified
forms the action URL contains both the CAKE and APP_DIR which messes
up my ACL check because it doesn't recognize controller, CAKE or the
action, APP_DIR. On top of that, my ACL check needs a camelized
controller and a variablized action, and the URL sent by the form
helper has put underscores in the controller name.

Can anyone suggest a better way to check permissions on both static
page changes AND AJAX calls without leaving the GUI? When a ACL check
fails in my app_controller it redirects to a failed permissions error
page. That is fine for static page changes, but in the middle of an
AJAX GUI it is a nightmare. I need AJAX permission checks to respond
within the AJAX framework rather than taking the user out of it to a
message page.

Please help!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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