Is it possible to limit the access of a collection to relation only?


I’d like some collections to be accessible only through their relationships. Is this possible? Like a Access to records through Segments only but instead Access to records through Relationships only
There is no sense to show some collections without going to their relationship first and also it is much more understandable to access some collections only through their relationships.`


Hi @mathieuh,

Yes it is possible. You can do that by updating the forest/name-of-your-collection.js file.
You need to set onlyForRelationships to true

// forest/my-collection.js
collection('my-collection', {
  onlyForRelationships: true,

Let me know if that works for you :wink:

@mathieuh another solution would be to do it through the UI of Forest Admin.

  1. Deactivate the Read (list) option in the different roles
  2. Enable only the Read (details)

See -

Let me know if that helps

Hi guys,

I went with @vince solution as it was easier to setup for me.