fix(richtext-slate): link and upload extra field drawers did not render fields if collection has unrelated access control set (#10583)

Fixes https://github.com/payloadcms/payload/issues/9695
This commit is contained in:
Alessio Gravili
2025-01-15 01:11:24 -07:00
committed by GitHub
parent 918bd72335
commit ecf05725e6
4 changed files with 21 additions and 13 deletions

View File

@@ -69,7 +69,7 @@ export const LinkButton: React.FC<{
const { t } = useTranslation()
const editor = useSlate()
const { getFormState } = useServerFunctions()
const { collectionSlug, docPermissions, getDocPreferences, globalSlug } = useDocumentInfo()
const { collectionSlug, getDocPreferences, globalSlug } = useDocumentInfo()
const { closeModal, openModal } = useModal()
const drawerSlug = useDrawerSlug('rich-text-link')
@@ -98,7 +98,9 @@ export const LinkButton: React.FC<{
const { state } = await getFormState({
collectionSlug,
data,
docPermissions,
docPermissions: {
fields: true,
},
docPreferences: await getDocPreferences(),
globalSlug,
operation: 'update',