fix: enable overrideAccess=true for public Payload repository reads

All public pages (site settings, header, pages, articles) now bypass
Payload's access control checks when reading, as they should be publicly
accessible without authentication. This fixes 403 Forbidden errors on
homepage and article rendering.
This commit is contained in:
2026-05-05 08:59:18 +02:00
parent 7809f21151
commit 1308fe4644
7 changed files with 12 additions and 10 deletions

View File

@@ -27,7 +27,7 @@ export class PayloadHeaderRepository implements IHeaderRepository {
const payload = await getPayload({ config: this.config });
const doc = (await payload.findGlobal({
slug: "header",
overrideAccess: false,
overrideAccess: true,
})) as PayloadHeaderGlobal;
const logoId =