Skip to content

Global update drops overrideAccess, so Local API updateGlobal fails filterOptions validation (3.90 regression) #18674

Open

Description

@FilipMessa

Describe the Bug

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: () => ({}) }

await payload.updateGlobal({
  slug: 'myGlobal',
  data: { link: { relationTo: 'pages', value: page.id } },
}) // ValidationError since 3.90

Reproduction Steps

  1. Global with a relationship field that has filterOptions, pointing at a collection whose read access requires a user.
  2. Call payload.updateGlobal from the Local API without user.
  3. 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.

Which area(s) are affected?

area: core

Environment Info

payload: 3.90.2
@payloadcms/db-sqlite: 3.90.2
Node: 26

Activity

  1. dinesh8999 commented on Oct 13, 2026

    @dinesh8999

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugarea: coreCore Payload functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions