Repository navigation
fix(content): an Author or Contributor syncs their own posts again - #4
Merged
Merged
Conversation
WordPress refuses both roles the pages list with a private status (HTTP 400, 403 inside), and that refusal failed the whole post sync: after the first run, edits on the site never reached the copy. cli-core 0.710.0 adds optional.needs: the pages call now needs capabilities.edit_pages and is skipped with a gap otherwise; pages check edit_others_pages, not edit_others_posts. Docs say what each role gets now, the roadmap item is done, and a test per role syncs through the CLI against the fake: the pages are never asked for, and an edit made after the first sync arrives. Checked live on the Docker WordPress 6.9.4 (author1, contrib): sync is complete, own posts in the copy, a title edit through wp-cli arrives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d's needs test Review: for these roles every sync reads all their posts again, and a post that leaves their view stays in the copy as it was. The trash claim was not checked live and is gone. The generic seed test (a call's needs lacked is never sent) joins the role tests, as cli-template seeds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Task
FIND-2812: with an Author or Contributor sign-in,
syncstopped copying posts after the first run.Why
WordPress refuses both roles the pages list with a private status: HTTP 400, with 403 inside
details. Thepostkind reads posts and pages, so that refusal failed the whole kind. Every later run started again at the pages call, so edits on the site never reached the copy.What
optional.needs.capabilities.edit_pages. Without it, the call is skipped with the gap "only an editor or administrator reads the pages". Pages checkedit_others_pages; posts keepedit_others_posts.complete, and an edit after the first sync arrives.needsis lacked is never sent.Testing
docs:check,generate:checkandtest:matrix:checkpass. Vitest with one worker: 402 tests pass; the content contract file now has 39.wc-c2, never a real site), file credential storage in a temp folder, keyring out of reach:editor1:complete.author1:complete, own posts copied, a title edit made through wp-cli arrived on the second sync, gapedit_pages.contrib: the same with their own draft.The release (0.1.1+) waits for the owner's npm trusted-publisher step; this PR does not release.
🤖 Generated with Claude Code