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?
Hmm
I would try to use React Hooks to get information about the document
https://payloadcms.com/docs/admin/hooks#usedocumentinfoWhich includes access control I believe
I wonder if the API provides access info via collection requests
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.
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).
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-viewThank you
@415764121280184330for this amazing effort. I'll be sure to contribute to it once I get some time. Marking this problem as solved.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.