Return correct permissions upon document update (#4352)

This commit is contained in:
Apoorv Mishra
2022-10-28 17:50:42 +05:30
committed by GitHub
parent c916d4f594
commit 19e26ba402

View File

@@ -863,6 +863,7 @@ router.post("documents.update", auth(), async (ctx) => {
userId: user.id,
includeState: true,
});
collection = document?.collection;
authorize(user, "update", document);
if (publish) {