You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ability to preview template in post editor for non administrators #60316
Since the update to unify the PostTemplatePanel in #56817 administrators can preview the current template in post-editor.
Any non-administrator roles (anyone without the edit_theme_options capability) cannot preview the template because they are not allowed to access the template/template part/navigation rest endpoints.
Proposed solution
Open up view-only access to any of the custom post types that are used in the site editor to any other user roles with the edit_post capability.
Additionally some of the blocks such as core/template–part & core/navigation will need to be updated to include a view-only mode. #58037, #58485, #58301
As @youknowriad suggested in #58301 (comment) I started by opening a PR that changes the permission callbacks of the template rest endpoint to allow view-only access to any users with the edit_post capability here: #60317
Once that is merged we can continue in smaller chunks.
Activity
fabiankaegy commentedon Mar 29, 2024
As @youknowriad suggested in #58301 (comment) I started by opening a PR that changes the permission callbacks of the template rest endpoint to allow view-only access to any users with the
edit_postcapability here: #60317Once that is merged we can continue in smaller chunks.
fabiankaegy commentedon Mar 31, 2024
Now that #60317 was approved and merged by a REST API maintainer I have created #60326 to add the preview mode to the template part block.