Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Hiding a collection in admin UI for certain users

default discord avatar
_sadajo_10 months ago
4

That was it, thanks so much 😁

  • default discord avatar
    .bakrylast year

    you have to have

    saveToJwt

    property to the role field

  • default discord avatar
    _sadajo_last year

    I have a custom role field in my User collection which doesn't seem to be part of that user object -- is there something additional I need to do to see it?



    Thanks mate



    Aha, that's the one!

  • discord user avatar
    dribbens
    last year

    Do with that you can write a function that returns true or false to say who gets which collections



    That takes the user object.



    admin.hidden can take a function

  • default discord avatar
    _sadajo_last year

    I'd like to a collection in the admin UI for a certain group of users, but still give them read access. The use case is that we have a collection which is essentially configurations for complex components that are curated by our team, which some components have relation to. When a content editor adds a component to a page layout, they select one of these curated configurations.



    However, I don't want to bog down the content editors view on the sidebar.



    If I remove the read access, that user group cannot select that configuration when setting up components that have the relation.



    Is there a way to do this?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.