Issue Overview
Gutenberg version 1.7.0
When a contributor uses Gutenberg he can use Image relative blocks. When he tries to use it as this role hasn't got the upload_files capability, the REST reply to site.url/wp-json/wp/v2/media is rest_cannot_create (403).
Steps to Reproduce (for bugs)
- Log in as a contributor.
- Add a new post.
- Select the image block.
- Upload an image.
- The image shows for a few milliseconds.
- The Upload/Browse buttons are replacing the vanished image.
- No feedback is provided to the contributor untill the automatic save feature run. Then the error is: "This block has encountered an error and cannot be previewed."
Chrome Version 62.0.3202.94
Expected Behavior
Image/files relative blocks should only show if ( current_user_can( 'upload_files' ) )
Current Behavior
Image/files relative blocks are showing no matter the "upload_files" capability of the logged in user.
Possible Solution
Screenshots / Video
Here is some oxygen 😉 https://cldup.com/K8qYyaHWbI.mp4
Related Issues and/or PRs
Todos
Issue Overview
Gutenberg version 1.7.0
When a contributor uses Gutenberg he can use Image relative blocks. When he tries to use it as this role hasn't got the
upload_filescapability, the REST reply to site.url/wp-json/wp/v2/media isrest_cannot_create(403).Steps to Reproduce (for bugs)
Chrome Version 62.0.3202.94
Expected Behavior
Image/files relative blocks should only show
if ( current_user_can( 'upload_files' ) )Current Behavior
Image/files relative blocks are showing no matter the "upload_files" capability of the logged in user.
Possible Solution
Screenshots / Video
Here is some oxygen 😉 https://cldup.com/K8qYyaHWbI.mp4
Related Issues and/or PRs
Todos