Closed ArcaneTSGK closed 2 months ago
Hey ArcaneTSGK,
I believe you're correct in your assumption that you need to manually include your own auth checks. This is by design, since Payload has no way to know your intention for these endpoints in advance.
If you need help manually checking auth, I'd check the website templates, specifically the checkRoles()
function and the access folder.
Hey, @akhrarovsaid is right, in your own endpoints you need to do checks for a user
by yourself.
Another way could be to utilize usage of overrideAccess: false
https://payloadcms.com/docs/access-control/overview#default-settings and passing req
.
I've updated the docs to mention this detail with a warning https://github.com/payloadcms/payload/pull/8321
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.
Link to reproduction
No response
Environment Info