docs: overrideAccess is now required - #17873
Open
nathanlentz wants to merge 1 commit into
Open
Conversation
nathanlentz
force-pushed
the
override-access/docs
branch
from
August 20, 2026 15:09
97b045b to
e03f1fc
Compare
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖
Largest pathsThese visualization shows top 20 largest paths in the bundle.Meta file: packages/next/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js
Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js
Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js
Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js
DetailsNext to the size is how much the size has increased or decreased compared with the base branch of this PR.
|
nathanlentz
force-pushed
the
override-access/docs
branch
2 times, most recently
from
August 20, 2026 16:37
6763375 to
3929069
Compare
nathanlentz
force-pushed
the
override-access/docs
branch
from
August 20, 2026 16:42
3929069 to
55d7983
Compare
nathanlentz
marked this pull request as ready for review
August 20, 2026 19:29
Documents the Local API break and updates every code sample that would no longer compile. The migration guide gains a breaking-change entry covering both audiences: TypeScript projects get a compile error naming each call site, JavaScript projects get no error and silently start enforcing access control. It also lists the three patterns the codemod cannot resolve, and records that the jobs queue keeps its Payload 3 behaviour. `docs/local-api/access-control.mdx` is rewritten. It opened with "local API operations override access control by default", and every section rested on that premise. Code samples across the docs and the Payload skill now state a value: `false` where a user or a request carrying one is in scope, `true` otherwise. Two skill samples sat directly above a section titled "Local API Access Control (CRITICAL)" while demonstrating the pattern that section warns about; both now authenticate and pass the user. `docs/authentication/custom-strategies.mdx` and `docs/configuration/overview.mdx` carry unrelated formatting changes: they were already unformatted on main and the pre-commit hook reformatted them.
nathanlentz
requested review from
AlessioGr,
JarrodMFlesch,
denolfe and
jacobsfletch
as code owners
August 21, 2026 17:34
nathanlentz
force-pushed
the
override-access/docs
branch
from
August 21, 2026 17:34
55d7983 to
a95d7dc
Compare
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.
Final PR in the
overrideAccessstack. Documents the break and updates every code sample that would no longer compile.Stacked on #17869. Review that one first.
Migration guide
A new entry at the top of Breaking Changes in
docs/migration-guide/v4.mdx. It separates the two audiences, because they fail differently:as any. Nothing fails at build time. Those calls now behave asoverrideAccess: falseand start enforcing access control. The symptom is a missing document, not a crash.docs/local-api/access-control.mdxRewritten rather than patched. The page opened with:
Re-frames messaging around what each mode does rather than how to opt in since there is no default any longer.
Other prose
local-api/overview.mdxaccess-control/overview.mdxjobs-queue/jobs.mdxCode samples
Samples throughout the docs and the skill omitted
overrideAccessentirely and would no longer compile. Every one now states a value.The rule applied:
falsewhere a user, or a request carrying one, is in scope.trueotherwise.Most samples illustrate a feature with no caller involved, so they get
true— which is also what they did before. Thefalsecases are the ones that answer for somebody: custom endpoints, MCP handlers, the admin dashboard widget,payload.login, and a server function that already had auserin scope. Where a handler has areq, it is now passed too, sinceoverrideAccess: falsewithout one runs as anonymous.Payload skill
Beyond the two lines that were factually wrong — a comment claiming
falseis "REQUIRED for access control", and a bullet documentingtrueas the default — two samples needed more than a value.The API route and Server Component examples sat directly above a section titled Local API Access Control (CRITICAL) while demonstrating exactly the pattern that section warns about. Adding
overrideAccess: truewould have made the skill teach the vulnerability on one screen and warn about it on the next. Both now callpayload.authand pass the user: