You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(richtext-lexical, plugin-multi-tenant): text editor exposes documents from other tenants (#13229)
## What
Before this PR, an internal link in the Lexical editor could reference a
document from a different tenant than the active one.
Reproduction:
1. `pnpm dev plugin-multi-tenant`
2. Log in with `[email protected]` and password `test`
3. Go to `http://localhost:3000/admin/collections/food-items` and switch
between the `Blue Dog` and `Steel Cat` tenants to see which food items
each tenant has.
4. Go to http://localhost:3000/admin/collections/food-items/create, and
in the new richtext field enter an internal link
5. In the relationship select menu, you will see the 6 food items at
once (3 of each of those tenants). In the relationship select menu, you
would previously see all 6 food items at once (3 from each of those
tenants). Now, you'll only see the 3 from the active tenant.
The new test verifies that this is fixed.
## How
`baseListFilter` is used, but now it's called `baseFilter` for obvious
reasons: it doesn't just filter the List View. Having two different
properties where the same function was supposed to be placed wasn't
feasible. `baseListFilter` is still supported for backwards
compatibility. It's used as a fallback if `baseFilter` isn't defined,
and it's documented as deprecated.
`baseFilter` is injected into `filterOptions` of the internal link field
in the Lexical Editor.
Copy file name to clipboardExpand all lines: docs/configuration/collections.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ The following options are available:
142
142
|`components`| Swap in your own React components to be used within this Collection. [More details](#custom-components). |
143
143
|`listSearchableFields`| Specify which fields should be searched in the List search view. [More details](#list-searchable-fields). |
144
144
|`pagination`| Set pagination-specific options for this Collection. [More details](#pagination). |
145
-
|`baseListFilter`| You can define a default base filter for this collection's List view, which will be merged into any filters that the user performs. |
145
+
|`baseFilter`| Defines a default base filter which will be applied to the List View (along with any other filters applied by the user) and internal links in Lexical Editor,|
146
146
147
147
<Bannertype="warning">
148
148
**Note:** If you set `useAsTitle` to a relationship or join field, it will use
0 commit comments