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.

Is there some way to visualize or graphically manage the access to collections and fields, to users?

default discord avatar
slick.mrlast year
4

Hello,



As the title states, I need some way to visualize access control information, and preferably some way for my teams to manage access to users who won't be writing any code. Is there a possible way or workaround?



If not, is there some way to access this information through the APIs?

  • default discord avatar
    notchrlast year

    Hmm



    I would try to use React Hooks to get information about the document

    https://payloadcms.com/docs/admin/hooks#usedocumentinfo

    Which includes access control I believe



    I wonder if the API provides access info via collection requests

  • default discord avatar
    slick.mrlast year

    Per my study, there are no APIs which provide access information regarding collections. The

    useDocumentInfo

    hook is only supposed to return information regarding the document currently being edited. This does not fulfill my requirement to get (and possibly manage) the access information for collections in a birdseye view.

  • default discord avatar
    hristo6004last year

    Hey, recently I wrote a simple access visualizer, it might need some adjustments for v3, works on v2 (I didn't use the default template so it's missing the sidebar and header, will have to update and push it lol).



    https://github.com/hristokoev/payload-access-view

    Maybe it'll help you a bit 🙂



    It displays info both about collections and fields, as it's taking the data from

    /api/access

    . Managing the access is something different though, I guess you'll have to first set up different collections for Access, Roles, etc, so later you could set up the access from the admin dashboard and not in the collection config.



    Hey,

    @234253195776491521

    , I updated it for payload 3 and made some fixes:

    https://github.com/hristokoev/payload-access-view
  • default discord avatar
    slick.mrlast year

    Thank you

    @415764121280184330

    for this amazing effort. I'll be sure to contribute to it once I get some time. Marking this problem as solved.

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.