I have a datagrid table in a user session (users visualizations by admin).
To initialize the datagrid I need to set the url data with an array with the items that should be in the table.
To do this, I must have an action allowed to show these data (Codeigniter mvc).
How can I protect my action to only allow access by users of my app via the jQuery.ajax() method?
For example, I'm already logged into my session and access a view with datagrid that uses this function to get the data and set it on a table:
$('#content').WATable(
{
url: '/api/showusers'
}).data('WATable');
Thank you!