The permissions returned by payload.auth() are effectively useless when 'context' is used inside access control. #10973
DriesCruyskens
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Since
payload.auth()
also returns permission, they are effectively useless as soon as any access control uses thecontext
.Let's say we have a UIField on a
products
collection that renders a form to generate documents in acredits
collection for it. We only want to allow this server action to run if the user has permission to createcredits
. A good reason for needingcontext.fromCreditsGenerator: true
is to disable creation ofcredits
throughout the admin dashboard.Beta Was this translation helpful? Give feedback.
All reactions