You'll need to handle this logic yourself in custom endpoints, if the request has been authenticated then on the
req
object you'll find
user
if
user
is null then it's unauthenticated
so you can do
if !user then deny
Ah gotcha, was wondering if there is a solution like the access for collection Configs
and other logic like
if !user.isAllowed then deny
no, for custom endpoints we're giving people full flexibility, since those endpoints could be used for literally anything
awesome, thanks for the quick answer!
Star
Discord
online
Get dedicated engineering support directly from the Payload team.