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) {