Site editor related links are exposed to non-admin users #61419
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Status] In Progress
Tracking issues with work in progress
[Type] Regression
Related to a regression in the latest release
Description
When generating a link to a page in the site editor, it is determined whether the site editor can be accessed, mainly through the following code, and the link destination is changed depending on the result.
gutenberg/packages/edit-post/src/components/header/more-menu/manage-patterns-menu-item.js
Lines 11 to 23 in 771acf4
However, in the latest version of Gutenberg,
canUser( 'read', 'templates' )
returnstrue
for non-administrator users, and they are now considered to have "access to the site editor." As a result, when you run the command, you will receive an error indicating that access is not possible.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
74b016a86c8e6130d47a3af5309f25e7.mp4
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: