Can Field Access overrule Collection Access?

default discord avatar
lauge.com
2 months ago
3

I have my users collection which i have a read access constrain on.


But i want a single field (fullName) to be readable for anyone. It doesnt seem to overrule the collections read access.



Should i really have to open read access on the collection and constraint every other field?

  • discord user avatar
    jarrod_not_jared
    Payload Team
    2 months ago

    Yeah, you will need to inverse what you have, open up the collection and lock down the fields. I’m sure you can write up some reusable access control that you can use on each field

  • default discord avatar
    lauge.com
    2 months ago

    All right. Would be nice to have the possibility to lock everything but open up a single field at a time instead.

  • discord user avatar
    jarrod_not_jared
    Payload Team
    2 months ago

    You could create a group field and put field access control on that, i.e.

    privateFields
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.