Grails 1.3.1 spring-security-core 0.4 jQuery 1.4.x
I need to figure out how to check security permissions on ajax requests. For example, I have a calendar displayed in a tab using the FullCalendar jQuery plugin. When I double click a day I display a New Event screen in a new tab. This is done like so:
$(tabId).load(contextPath + '/event/create', {tabId:tabId}, function() {
setupEvent(tabId, date, now);
});
So right now, if the user who is trying to create a new event doesn't have the correct permissions, the new tab shows a permission denied message. I'd rather not display a new tab at all and probably would prefer to show a dialog with the error message. Anyone have any awesome ideas on how to address this?