Changed the callback to 'callback' instead of 'success' and 'failure' since if the layer is read only it's really because the user is unauthorized which should return a 401 status instead of 200.  Also added a check to see if the layer is editable before querying for layer permissions because we don't want to check for tms layers