fix: draft status access control checks (#8486)
This commit is contained in:
@@ -37,7 +37,10 @@ export const getDocumentPermissions = async (args: {
|
|||||||
},
|
},
|
||||||
req: {
|
req: {
|
||||||
...req,
|
...req,
|
||||||
data,
|
data: {
|
||||||
|
...data,
|
||||||
|
_status: 'draft',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user