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
Global update drops overrideAccess, so Local API updateGlobal fails filterOptions validation (3.90 regression) #18674
Since 3.90, validateFilterOptions queries with overrideAccess: overrideAccess ?? false. The collection update path threads overrideAccess into beforeChange, but the global update operation (packages/payload/src/globals/operations/update.ts, beforeChangeArgs) does not. So a Local API payload.updateGlobal(...) — whose overrideAccess defaults to true — validates relationship filterOptions as an anonymous user.
With a related collection using default access (signed-in only), any Local API global update without a user (seed scripts, integration tests) now fails:
ValidationError: The following field is invalid: <relationship field>
This worked in 3.88.0.
Link to the code that reproduces this issue
Minimal shape (no repro repo):
// collection `pages` with default access// global with a relationship field:{name: 'link',type: 'relationship',relationTo: ['pages'],filterOptions: ()=>({})}awaitpayload.updateGlobal({slug: 'myGlobal',data: {link: {relationTo: 'pages',value: page.id}},})// ValidationError since 3.90
Reproduction Steps
Global with a relationship field that has filterOptions, pointing at a collection whose read access requires a user.
Call payload.updateGlobal from the Local API without user.
Validation fails, although overrideAccess defaults to true.
Fix: add overrideAccess to beforeChangeArgs in the global update operation, mirroring the collection update utility. We run that one-line patch via pnpm patch.
Hi! I'd like to contribute to this issue. I'll investigate how overrideAccess is passed through beforeChangeArgs in the global update operation and compare it with the collection update utility. I'll verify the regression and tests, then propose a focused fix following the project's conventions. Please let me know if anyone is already working on this. Thank you!
Confirming this is still present in 3.92.0 (checked globals/operations/update.js — beforeChangeArgs has no overrideAccess, while collections/operations/utilities/update.js passes it).
It also hits production paths, not only seeds/tests: a Next.js server action that saves a settings global with payload.updateGlobal({ slug, data }) after its own staff auth check. The global has a relationship to a collection whose read is staff-only, with an object filterOptions ({ pricingModel: { equals: '…' } }). On 3.88 the save worked; on 3.92 every valid choice is refused with ValidationError: The following field is invalid: <label>, because the lookup runs anonymously and finds nothing.
Our interim workaround was removing filterOptions from that field (a beforeChange hook already enforces the constraint). Passing user to updateGlobal should also work, but the fix proposed above (thread overrideAccess into beforeChangeArgs) is the right one.
Activity
dinesh8999 commentedon Oct 13, 2026
Hi! I'd like to contribute to this issue. I'll investigate how
overrideAccessis passed throughbeforeChangeArgsin the global update operation and compare it with the collection update utility. I'll verify the regression and tests, then propose a focused fix following the project's conventions. Please let me know if anyone is already working on this. Thank you!fix(payload): thread overrideAccess into beforeChange in global update (
clarson00 commentedon Oct 23, 2026
Confirming this is still present in 3.92.0 (checked
globals/operations/update.js—beforeChangeArgshas nooverrideAccess, whilecollections/operations/utilities/update.jspasses it).It also hits production paths, not only seeds/tests: a Next.js server action that saves a settings global with
payload.updateGlobal({ slug, data })after its own staff auth check. The global has a relationship to a collection whosereadis staff-only, with an objectfilterOptions({ pricingModel: { equals: '…' } }). On 3.88 the save worked; on 3.92 every valid choice is refused withValidationError: The following field is invalid: <label>, because the lookup runs anonymously and finds nothing.Our interim workaround was removing
filterOptionsfrom that field (abeforeChangehook already enforces the constraint). PassingusertoupdateGlobalshould also work, but the fix proposed above (threadoverrideAccessintobeforeChangeArgs) is the right one.