-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Capabilities needed to use the Site Editor are not documented #1801
Comments
Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels. |
Suggested Changes to Documentation 1. Update the
edit_theme_options
2. Add a New Section for Site Editor Capabilities
Site Editor CapabilitiesThe Site Editor in Full Site Editing (FSE) environments requires the following capabilities for full functionality:
3. Provide Examples for Custom Roles Include examples of how to create custom roles with access to the Site Editor using the add_role() and add_cap() functions.
4. Explain REST API Capability Checks Mention that some REST API endpoints used by the Site Editor may require additional capabilities, such as edit_posts or edit_pages, to function properly. Provide guidance on debugging REST API errors related to insufficient capabilities. REST API Capability ChecksThe Site Editor relies on REST API endpoints to load data and preview changes. If users encounter 403 Forbidden errors, ensure they have the following capabilities:
|
Issue Description
In the process of adding a new user role that would be able to access the Site Editor on a site using full site editing, I've discovered that there is no documentation anywhere about which capabilities are needed for such access. The Roles And Capabilities page has no references to the Site Editor or block themes at all.
The
wp-admin/site-editor.php
file itself contains a check foredit_theme_options
, but from my testing this alone is insufficient. I created a fresh WP install, addededit_theme_options
to the default Editor role, and tried to use the Site Editor. I found that:It seems there are additional capability checks buried inside the API requests... but there's zero guidance as to what those are.
URL of the Page with the Issue
https://wordpress.org/documentation/article/roles-and-capabilities/
Section of Page with the issue
https://wordpress.org/documentation/article/roles-and-capabilities/#capabilities
https://wordpress.org/documentation/article/roles-and-capabilities/#edit_theme_options
Why is this a problem?
Without this documentation, there's no way to know how to add or modify roles to control site editor access. Many multi-user sites need to give a design or development team access to the Site Editor to change appearance. Having to make those users administrators is a security issue, since that also grants them control over users and plugins that may be risky.
Suggested Fix
At a minimum, I'd like to see the documentation for
edit_theme_options
(and whichever other capabilities are involved) improved to mention that they control Site Editor access when FSE is active.A larger but better fix would be dedicated documentation (not sure where...) about how to allow or remove Site Editor access for any user role.
The text was updated successfully, but these errors were encountered: