Renamed decorator for clarity
Moved permission checking into its own function
Removed unused imports
Added decorator to set the resource context in XHR calls
Use a single endpoint for retrieving failing checks via XHR
Removed unused limit parameter