From 0487bd8ebe559b16cb3047fe8e3fdcf230db23ae Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Thu, 26 Feb 2026 02:59:30 +0100 Subject: [PATCH] feat: show draft posts and products on testing and staging --- src/payload/collections/Pages.ts | 2 +- src/payload/collections/Posts.ts | 2 +- src/payload/collections/Products.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/payload/collections/Pages.ts b/src/payload/collections/Pages.ts index 2baec177..517ce61f 100644 --- a/src/payload/collections/Pages.ts +++ b/src/payload/collections/Pages.ts @@ -13,7 +13,7 @@ export const Pages: CollectionConfig = { }, access: { read: ({ req: { user } }) => { - if (process.env.NODE_ENV === 'development') { + if (process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging') { return true; } if (user) { diff --git a/src/payload/collections/Posts.ts b/src/payload/collections/Posts.ts index eb7958e6..a497b8de 100644 --- a/src/payload/collections/Posts.ts +++ b/src/payload/collections/Posts.ts @@ -23,7 +23,7 @@ export const Posts: CollectionConfig = { }, access: { read: ({ req: { user } }) => { - if (process.env.NODE_ENV === 'development') { + if (process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging') { return true; } if (user) { diff --git a/src/payload/collections/Products.ts b/src/payload/collections/Products.ts index b781b683..78387f39 100644 --- a/src/payload/collections/Products.ts +++ b/src/payload/collections/Products.ts @@ -24,7 +24,7 @@ export const Products: CollectionConfig = { }, access: { read: ({ req: { user } }) => { - if (process.env.NODE_ENV === 'development') { + if (process.env.NODE_ENV === 'development' || process.env.TARGET === 'staging') { return true; } if (user) {