Replies: 1 comment
-
We used plugin to handle that: const addAccess: Plugin = (incomingConfig: Config): Config => { const addEntityOptions= (obj:Field[]) =>{ let config: Config = { config = { `import type { CollectionConfig } from 'payload/types' export const Roles: CollectionConfig = { |
Beta Was this translation helpful? Give feedback.
-
Is there any way I can use a dynamic list of collections in to create a select field's options?
In my user collection, I want to have a field called
editableCollections
that I check against in my access functions. The idea being that we have an event coordinator that can edit theEvents
collection but not theProducts
collection, for example.Here is what I have for the field so far:
However, when I use the same
collections
object used in the payload config, the Users collection is included and I'm guessing there's a circular dependency issue because I get an error that isn't really an error:Is there some better way to get a list of all collections that doesn't need to be updated if a new collection is added?
Beta Was this translation helpful? Give feedback.
All reactions