AJAX access control


I’m making my first attemps of using AJAX, but a question has come to my mind: it seems that the actions called through AJAX doesn’t validate (I’m using “rights”, but I guess it doesn’t has to do anything with it), so any user can launch (through AJAX) a request for that action. Is there any way to enforce access control or am I missing something?

The action called with ajax are checked exactly as the standard ones, there are no difference at all.