fix: draft status access control checks (#8486)

This commit is contained in:
James Mikrut
2024-09-30 12:41:54 -04:00
committed by GitHub
parent e765a5e866
commit 0c1004537d
2 changed files with 8 additions and 2 deletions

View File

@@ -37,7 +37,10 @@ export const getDocumentPermissions = async (args: {
}, },
req: { req: {
...req, ...req,
data, data: {
...data,
_status: 'draft',
},
}, },
}) })

View File

@@ -389,7 +389,10 @@ const DocumentInfo: React.FC<
if (docAccessURL) { if (docAccessURL) {
const res = await fetch(`${serverURL}${api}${docAccessURL}?${qs.stringify(params)}`, { const res = await fetch(`${serverURL}${api}${docAccessURL}?${qs.stringify(params)}`, {
body: JSON.stringify(data), body: JSON.stringify({
...(data || {}),
_status: 'draft',
}),
credentials: 'include', credentials: 'include',
headers: { headers: {
'Accept-Language': i18n.language, 'Accept-Language': i18n.language,