fix: Passing publish=true in documents.update with published document errors
This commit is contained in:
@@ -990,7 +990,10 @@ router.post(
|
||||
}
|
||||
|
||||
if (publish) {
|
||||
authorize(user, "publish", document);
|
||||
if (document.isDraft) {
|
||||
authorize(user, "publish", document);
|
||||
}
|
||||
|
||||
if (!document.collectionId) {
|
||||
assertPresent(
|
||||
collectionId,
|
||||
|
||||
Reference in New Issue
Block a user