Access control with query accessing linked collection #1315
thebergamo
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 3 replies
-
You can use the https://payloadcms.com/docs/fields/relationship#filtering-relationship-options Assuming the name of your checkbox is public, you would add this to your relationship field: Does that make sense? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I'm loving the control I can have with Payload, it is really amazing CMS like no other.
Today I stumbled in a use case that might be useful to others as well.
I've a collection of pages, and in this I have a field to mark if user has a access to this page (simple checkbox)
With that in mind, I also have a global footer where I link to this pages, but if I would like to have a way to have a "filter condition" to only return in the API for public access the links with pages that are marked as not for specific users.
Only solution that comes to my mind to overcome this is to add this checkbox also to the global footer, but it would be great to filter linked pages properties also.
Would like to know your thoughts on that, thanks in advance:)
Beta Was this translation helpful? Give feedback.
All reactions