Skip to content

Commit eacedba

Browse files
committed
Fix the access.read permission issue in the Moments collection.
1 parent 62a77e7 commit eacedba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/collections/Moments/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { CollectionConfig } from 'payload'
22

33
import { anyone } from '../../access/anyone'
44
import { authenticated } from '../../access/authenticated'
5+
import { authenticatedOrPublished } from '@/access/authenticatedOrPublished'
56
import { slugField } from 'payload'
67
import { generatePreviewPath } from '../../utilities/generatePreviewPath'
78

@@ -10,7 +11,7 @@ export const Moments: CollectionConfig = {
1011
access: {
1112
create: authenticated,
1213
delete: authenticated,
13-
read: anyone,
14+
read: authenticatedOrPublished,
1415
update: authenticated,
1516
},
1617
defaultSort: '-publishedAt',

0 commit comments

Comments
 (0)