Author combobox component returns 403 error for non-admin users #29845
Labels
[Priority] High
Used to indicate top priority items that need quick attention
[Status] In Progress
Tracking issues with work in progress
[Type] Regression
Related to a regression in the latest release
Description
Since #23237, a site with greater than 25 authors will display a
ComboboxControl
component to search for authors instead of the standardSelectControl
. However, the REST request to fetch the list of authors will fail for users who do not have admin privileges (such as editors or contributors, who might still be editing posts). This can result in either theSelectControl
being displayed with a large number of options, or worse, theComboboxControl
being displayed but with only a partially complete list of users to choose from (with autocomplete functionality broken).Step-by-step reproduction instructions
wp user generate --role=editor --count=100
to generate 100 editor users. The more, the better!ComboboxControl
with working autocomplete functionality.SelectControl
with a huge number of options, or aComboboxControl
with non-functional autocomplete.Expected behaviour
Non-admin users who can access the post editor and have the
edit_others_posts
capability should still see theComboboxControl
author UI and be able to view and select from an appropriate list of author-type users.Actual behaviour
See the REST error response above.
Code snippet (optional)
Related to
WordPress information
Device information
The text was updated successfully, but these errors were encountered: