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

Synced Pattern: Posts cannot be saved if a pattern is updated by a non-administrator #56356

Closed
t-hamano opened this issue Nov 21, 2023 · 2 comments
Labels
[Block] Pattern Affects the Patterns Block [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

Description

For example, an author can insert a synced pattern created by an administrator using the inserter. The author can then edit the content within the synced pattern.

However, if you update the post, the save will fail, probably because you don't have permission to update that pattern. Unsaved entities will remain and you will not be able to save unless you reload your browser.

The behavior I expect is that you shouldn't be able to edit the synced pattern in the editor unless you have permission to edit it.

Step-by-step reproduction instructions

  • Create a synced pattern with an admin user.
  • Create a user with author privileges and log in as that user.
  • Inserts a synced pattern created by an admin user.
  • Update content within a synced pattern.
  • Press the update button.
  • The save should fail.

Screenshots, screen recording, code snippet

f0acd7306698c5d149b83dc29dc88667.mp4

Environment info

Latest Gutenberg (17.1.0-rc.1)

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

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Block] Pattern Affects the Patterns Block labels Nov 21, 2023
@aaronrobertshaw aaronrobertshaw moved this to Todo in Patterns Nov 21, 2023
@glendaviesnz
Copy link
Contributor

glendaviesnz commented Nov 21, 2023

This looks like a duplicate of #54442

@t-hamano
Copy link
Contributor Author

@glendaviesnz Thank you for teaching me. I'm sure it's the same, so I'll close this issue.

@t-hamano t-hamano closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Patterns Nov 22, 2023
@t-hamano t-hamano added the [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Pattern Affects the Patterns Block [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants