Added some checks to see if a resource was editable