Not possible to set post thumbnails without edit_post capability
|Reported by:||johnbillion||Owned by:|
Steps to reproduce:
- Register a custom post type which supports a thumbnail and uses custom capability mapping.
- Give a user (or role) the ability to upload files (upload_files) and the ability to edit posts of the post type (eg. edit_foos) but not the ability to edit posts (edit_posts).
This user will be able to upload files and will see a link to 'Use as featured image' but when this link is clicked the featured image won't be set and will fail with a response of '-1' which shows up in the 'Featured Image' meta box.