I'm querying items from a SharePoint 2013 list via JavaScript / JSOM. The JavaScript is running on a SharePoint 2013 website (not necessarily the same as the one, containing the list, but in the same farm).
Now I want to check if the current user has the rights to create/edit items in said list. How can I do this using JSOM or the SharePoint REST services.