Skip to content
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

Ensure Designers can only edit pages that already have a block template #152

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

tellyworth
Copy link
Contributor

Editing a page without a block template means changes would immediately go live. This prevents it entirely, which means the workflow requires a dev to create the page template before a designer can start editing.

How to test the changes in this Pull Request:

  1. Log in as a Designer user
  2. Go to wp-admin / Pages / All Pages
  3. Pages that have templates (like Download) should have an Edit button; others (like Enterprise currently) should not.

@tellyworth tellyworth added the [Type] Bug Something isn't working label Dec 1, 2022
…te file

Editing a page without a block template means changes would immediately go live. This prevents it entirely, which means the workflow requires a dev to create the page template before a designer can start editing.
@tellyworth tellyworth force-pushed the fix/designer-edit-templated-pages-only branch from 3531492 to f9d329b Compare December 5, 2022 06:08
@ryelle
Copy link
Contributor

ryelle commented Dec 9, 2022

Looking at the code, this will work to allow designer-users to only edit pages, but they won't be able to build up new pages (like Enterprise, or About). Ideally the designer-user should still be able to edit those pages, but it should not change the live page's _wp_page_template. Even if a developer creates an empty page template, the meta value will still be wiped out when anyone saves the existing page, since for example, the page-enterprise.php template is not available in the new theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working
Projects
Status: On Hold/Blocked
Development

Successfully merging this pull request may close these issues.

2 participants