Re: Security Component and AJAX

2009-06-03 Thread Martin Westin
[mailto:martin.westin...@gmail.com] > Sent: June-03-09 9:09 AM > To: CakePHP > Subject: Re: Security Component and AJAX > > Hi, I'm just buttin in with a quick question. Something for you to check. > > There is no other ajax request after the page loads and before the for

RE: Security Component and AJAX

2009-06-03 Thread Dave Maharaj :: WidePixels.com
fades out...updated selections fade in the users profile. Dave -Original Message- From: Martin Westin [mailto:martin.westin...@gmail.com] Sent: June-03-09 9:09 AM To: CakePHP Subject: Re: Security Component and AJAX Hi, I'm just buttin in with a quick question. Something for you to check

RE: Security Component and AJAX

2009-06-03 Thread Dave Maharaj :: WidePixels.com
) ) ) And the save returns number 1 app/controllers/users_controller.php (line 236) 1 Which is debug($this->User->save($this->data, true, array_keys($this->User->$join_table->schema(; -----Original Message----- From: Miles J [mailto:mileswjohn...@g

Re: Security Component and AJAX

2009-06-03 Thread Martin Westin
Hi, I'm just buttin in with a quick question. Something for you to check. There is no other ajax request after the page loads and before the form is posted? If so then this will also cause problems for SecurityComponent since the token will be old. /Martin On Jun 3, 7:20 am, Miles J wrote: > A

Re: Security Component and AJAX

2009-06-02 Thread Miles J
At /joesmith/update/systems/, if you can debug the data you should be able to save it. What exactly happens, a white page? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send e

RE: Security Component and AJAX

2009-06-02 Thread Dave Maharaj :: WidePixels.com
...@gmail.com] Sent: June-03-09 1:37 AM To: CakePHP Subject: Re: Security Component and AJAX Actually nvm I think I read it wrong. Whats the content passed during the ajax request (find it with Firebug). --~--~-~--~~~---~--~~ You received this message because you are

Re: Security Component and AJAX

2009-06-02 Thread Miles J
Actually nvm I think I read it wrong. Whats the content passed during the ajax request (find it with Firebug). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cak

RE: Security Component and AJAX

2009-06-02 Thread Dave Maharaj :: WidePixels.com
$model_table, array('multiple'=>'checkbox', 'label'=>false)); ?> end('Submit');?> Just a bunch of check boxes. Dave -Original Message----- From: Miles J [mailto:m

Re: Security Component and AJAX

2009-06-02 Thread Miles J
If you are doing it that way, theres no possible way for your data to show up in $this->data. Your ajax fields need to be wrapped in data[], else it should show up in $this->params['form']. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

RE: Security Component and AJAX

2009-06-02 Thread Dave Maharaj :: WidePixels.com
7;, //success: function() {$(this).fadeOut("slow")} }); return false; // <-- important! }); }); -Original Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: June-03-09 12:53 AM To: CakeP

Re: Security Component and AJAX

2009-06-02 Thread Miles J
Can I see your js ajax code. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsu

RE: Security Component and AJAX

2009-06-02 Thread Dave Maharaj :: WidePixels.com
-php@googlegroups.com Subject: Re: Security Component and AJAX On Tue, Jun 2, 2009 at 9:37 PM, Dave Maharaj :: WidePixels.com wrote: > > My Ajax functions are in different controllers but I added > > function beforeFilter() >      { >          parent::beforeFilter(); >    

Re: Security Component and AJAX

2009-06-02 Thread brian
On Tue, Jun 2, 2009 at 9:37 PM, Dave Maharaj :: WidePixels.com wrote: > > My Ajax functions are in different controllers but I added > > function beforeFilter() >      { >          parent::beforeFilter(); >                if ($this->params['action'] == 'update_systems') >                { >      

RE: Security Component and AJAX

2009-06-02 Thread Dave Maharaj :: WidePixels.com
And the updated data is not saved Ideas? Thanks, Dave -Original Message- From: Miles J [mailto:mileswjohn...@gmail.com] Sent: June-02-09 10:51 PM To: CakePHP Subject: Re: Security Component and AJAX Security component does not work in conjunction with Ajax. If all your ajax requests are

Re: Security Component and AJAX

2009-06-02 Thread Miles J
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 Co

Security Component and AJAX

2009-06-02 Thread Dave Maharaj :: WidePixels.com
I been trying all day to get a form to submit Ajax and nothing. I removed the security component and it worked perfectly. I have not modified the form in any way but when I add the security component it never saves the data. The form is submitted Ajax. Is there something i am missing? Form: cre

Re: Security component and AJAX

2009-04-21 Thread Brendon Kozlowski
That's a handy solution, thanks for sharing, Martin. On Apr 21, 7:27 am, Martin Westin wrote: > SecurityComponent does not do much for Ajax requests. At least not in > that way. > > I use $this->Post-del($id) less and less. Instead I use deleteAll() in > this way: > $this->Post->deleteAll(array(

Re: Security component and AJAX

2009-04-21 Thread Martin Westin
SecurityComponent does not do much for Ajax requests. At least not in that way. I use $this->Post-del($id) less and less. Instead I use deleteAll() in this way: $this->Post->deleteAll(array( 'Post.id' => $id, 'Post.author_id'=>$auth_user_id ),true,true); This will ensure that a user can

Security component and AJAX

2009-04-20 Thread Dave Maharaj :: WidePixels.com
I have just been messing around with my app and changing values in Ajax links with Firebug to see what happens...sure enough I can be logged in as user 1 and thru an Ajax form delete a post by User 2. Been reading about the Security Component but seems from what I have found is that it does not wor

Security component and AJAX forms

2009-01-01 Thread archF6
I am using the Security component, and it works great, except when I load a form via AJAX, the token fields are not being written in the form. I'm using the form helper. Also note the action that renders the form is in a different controller, so not sure if that's part of the problem. I can use