Include access control utilities (accessOR, accessAND) into the Payload core package #16263
MurzNN
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.
-
Almost every project requires creating access control functions that check multiple things at once. A simple example is
isAdmin() OR isDocumentOwner().But we can't simply add the "or" condition to the access control property of a collection.
To simplify this task, every project for now should invent its own helper functions.
For example, in the Payload Ecommerce plugin, there are two universal and convenient reusable functions:
accessOR()andaccessAND().So, would be great to copy them into the Payload core, to make them available for everyone out of the box.
Beta Was this translation helpful? Give feedback.
All reactions