Possible typo on collection access control docs

default discord avatar
thisisnotchris
last month
12

Hello Payload team! Just wanted to check if the example on this section is correct.

https://payloadcms.com/docs/access-control/collections

"Example Collection config"



Should it be returning "Categories" or "Posts"?



@jmikrut



import { CollectionConfig } from 'payload/types';

const Posts: CollectionConfig = {
  slug: "posts",
  access: {
    create: ({ req: { user } }) => { ... },
    read: ({ req: { user } }) => { ... },
    update: ({ req: { user } }) => { ... },
    delete: ({ req: { user } }) => { ... },
    admin: ({ req: { user } }) => { ... },
  },
};

export default Posts;


Fixed ^



also tagging @patrikkozak @jesschow, as this is a commonly viewed example



Also tagging @denolfe in case this got buried in the queue

  • discord user avatar
    Jarrod
    Payload Team
    last month

    yes this is a type O

  • default discord avatar
    thisisnotchris
    last month

    I think I'm AB Positive



    not sure

  • discord user avatar
    Jarrod
    Payload Team
    last month

    😃

  • default discord avatar
    thisisnotchris
    last month

    also I didnt ping you @Jarrod because I felt bad for pinging you a bunch last week

  • discord user avatar
    denolfe
    Payload Team
    last month

    Updated in master

  • discord user avatar
    Jarrod
    Payload Team
    last month

    @thisisnotchris no need to feel bad!

  • discord user avatar
    jesschow
    Payload Team
    last month

    feel

    afraid
Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.