WordPress.org

Make WordPress Core

Opened 22 months ago

Last modified 13 months ago

#49393 new defect (bug)

Author user role, Gutenberg add picture from someone else, rest_forbidden_context crash, image size crash

Reported by: debricon Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3.2
Component: Editor Keywords:
Focuses: administration, rest-api Cc:

Description

Login as a user with role Author (important, user editor works normaly).

Create post, add existing picture from the gallery to your article.
In the console you'll get an error :
https://i.ibb.co/Xpkh5zs/bug-wordpress.png

/wp-json/wp/v2/media/11133?context=edit&_locale=user
{code: "rest_forbidden_context",

and you can't change the image size.

  • User roles Editor and Admin are not affected.
  • Uploaded picture by the Author are not affected.

Change History (2)

#1 @SergeyBiryukov
22 months ago

  • Component changed from Gallery to Editor

#2 @TimothyBlynJacobs
13 months ago

I think this needs to be reported in the Gutenberg repository: https://github.com/wordpress/gutenberg It looks like the error is client side, an author legitimately wouldn't have access to the media gallery.

Note: See TracTickets for help on using tickets.