Opt-in to cross tenant relationships on a per-field basis when using the multi-tenant plugin #12872
evelynhathaway
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.
-
Summary
It would be beneficial for some multi-tenant applications to selectively allow relationships to cross the tenant boundary, especially for linking.
Background
The multi tenant plugin does a great job of separating documents by tenant, but it doesn't allow for selectively bridging between tenants in relationships since the plugin's
filterOptions
is added unconditionally:payload/packages/plugin-multi-tenant/src/utilities/addFilterOptionsToFields.ts
Line 123 in 6c4dfe4
However, the filters on the tenants, users, and each multi-tenant collection list view can already be toggled off, and serve as a good model for how the relationship filters can be disabled:
payload/packages/plugin-multi-tenant/README.md
Lines 38 to 43 in 6c4dfe4
payload/packages/plugin-multi-tenant/README.md
Lines 153 to 160 in 6c4dfe4
Request
While I am not attached to the syntax, it would be nice to have granular control of relationship filters like the below.
Similar to the underlying request from #10983
Use Case
If implemented, most of the relationships in my instance would take advantage of the current behavior as the default. The safety from the separation being the remaining the default is desired, just like
baseListFilter
. I think that makes sense for most cases, and is of course critical for fields like theparent
relationship from the nested documents plugin.The relationships fields that I would opt out in my instance would be links (rich text, button blocks, navigation items) and redirect destinations. My instance would be able to support the access controls required to accomodate this, and I am not advocating for the plugin to provide access controls for cross-tenant relationships as I believe it would be too much of a implementation-specific niche for the plugin to handle itself.
Advantages for My Use Case
Beta Was this translation helpful? Give feedback.
All reactions