mirror of
https://github.com/outline/outline.git
synced 2026-12-06 03:05:08 +03:00
fix: apply withMembership scope in documents.drafts
This commit is contained in:
1 parent
20b4998da8
commit
9ba8b197ce
1 file changed
+1
-7
@@ -380,13 +380,7 @@ router.post(
|
||||
delete where.updatedAt;
|
||||
}
|
||||
|
||||
const collectionScope: Readonly<ScopeOptions> = {
|
||||
method: ["withCollectionPermissions", user.id],
|
||||
};
|
||||
const documents = await Document.scope([
|
||||
"defaultScope",
|
||||
collectionScope,
|
||||
]).findAll({
|
||||
const documents = await Document.defaultScopeWithUser(user.id).findAll({
|
||||
where,
|
||||
order: [[sort, direction]],
|
||||
offset: ctx.state.pagination.offset,
|
||||
|
||||
Reference in new issue
Block a user